issuer = ((RequestAbstractType) message).getIssuer(); } else if (message instanceof StatusResponseType) { issuer = ((StatusResponseType) message).getIssuer(); } else { throw new SamlException("invalid message type: " + message.getClass().getSimpleName());
/** * Resolve the SAML entity ID from a SAML 2 response. * * @param response the response * * @return the entity ID, or null if it could not be resolved */ @Nullable protected String processSaml2Response( @Nonnull final org.opensaml.saml.saml2.core.StatusResponseType response) { if (response.getIssuer() != null) { return processSaml2Issuer(response.getIssuer()); } return null; }
/** * Gets issuer from saml response. * * @param response the response * @return the issuer from saml response */ private static String getIssuerFromSamlResponse(final StatusResponseType response) { return response.getIssuer().getValue(); }
/** * Gets issuer from saml object. * * @param object the object * @return the issuer from saml object */ public static String getIssuerFromSamlObject(final SAMLObject object) { if (object instanceof RequestAbstractType) { return RequestAbstractType.class.cast(object).getIssuer().getValue(); } if (object instanceof StatusResponseType) { return StatusResponseType.class.cast(object).getIssuer().getValue(); } return null; }
issuer = ((RequestAbstractType) message).getIssuer(); } else if (message instanceof StatusResponseType) { issuer = ((StatusResponseType) message).getIssuer(); } else { throw new SamlException("invalid message type: " + message.getClass().getSimpleName());