code: protected final void validateIssuer(final Issuer issuer, final SAML2MessageContext context) {
          if (issuer.getFormat() != null && !issuer.getFormat().equals(NameIDType.ENTITY)) {
              throw new SAMLIssuerException("Issuer type is not entity but " + issuer.getFormat());
          }
  
          final String entityId = context.getSAMLPeerEntityContext().getEntityId();
          if (entityId == null || !entityId.equals(issuer.getValue())) {
              throw new SAMLIssuerException("Issuer " + issuer.getValue() + " does not match idp entityId " + entityId);
          }
      }
docs: Validate issuer format and value.
  
  @param issuer  the issuer
  @param context the context