/** * Issuer of the SAML token * * @return */ @Override public String getIssuerName() { return assertion.getIssuer(); }
/** * Test that the issuer is present * @param assertion * @throws ValidationException */ protected void validateIssuer(Assertion assertion) throws ValidationException { if (DatatypeHelper.isEmpty(assertion.getIssuer())) { throw new ValidationException("Issuer not present"); } }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException { Assertion assertion = (Assertion) samlElement; if (assertion.getID() != null) { domElement.setAttributeNS(null, Assertion.ID_ATTRIB_NAME, assertion.getID()); if (assertion.getMinorVersion() != 0) { domElement.setIdAttributeNS(null, Assertion.ID_ATTRIB_NAME, true); } } if (assertion.getIssuer() != null) { domElement.setAttributeNS(null, Assertion.ISSUER_ATTRIB_NAME, assertion.getIssuer()); } if (assertion.getIssueInstant() != null) { String date = ISODateTimeFormat.dateTime().print(assertion.getIssueInstant()); domElement.setAttributeNS(null, Assertion.ISSUEINSTANT_ATTRIB_NAME, date); } domElement.setAttributeNS(null, Assertion.MAJORVERSION_ATTRIB_NAME, "1"); if (assertion.getMinorVersion() == 0) { domElement.setAttributeNS(null, Assertion.MINORVERSION_ATTRIB_NAME, "0"); } else { domElement.setAttributeNS(null, Assertion.MINORVERSION_ATTRIB_NAME, "1"); } } }
/** * Method getIssuerString returns the issuerString of this AssertionWrapper object. * * @return the issuerString (type String) of this AssertionWrapper object. */ public String getIssuerString() { if (saml2 != null && saml2.getIssuer() != null) { return saml2.getIssuer().getValue(); } else if (saml1 != null) { return saml1.getIssuer(); } LOG.error( "AssertionWrapper: unable to return Issuer string - no saml assertion " + "object or issuer is null" ); return null; }
/** * Method getIssuerString returns the issuerString of this AssertionWrapper object. * * @return the issuerString (type String) of this AssertionWrapper object. */ public String getIssuerString() { if (saml2 != null && saml2.getIssuer() != null) { return saml2.getIssuer().getValue(); } else if (saml1 != null) { return saml1.getIssuer(); } LOG.error( "AssertionWrapper: unable to return Issuer string - no saml assertion " + "object or issuer is null" ); return null; }
log.info("Attempting to extract issuer from enclosed SAML 1.x Assertion(s)"); for (Assertion assertion : assertions) { if (assertion != null && assertion.getIssuer() != null) { if (issuer != null && !issuer.equals(assertion.getIssuer())) { throw new MessageDecodingException("SAML 1.x assertions, within response " + response.getID() + " contain different issuer IDs"); issuer = assertion.getIssuer();
if (assertion.getIssuer() == null || assertion.getIssuer().isEmpty()) { if (log.isDebugEnabled()) { log.debug("Issuer is empty in the SAML assertion"); try { if (log.isDebugEnabled()) { log.debug("Issuer is :" + assertion.getIssuer()); assertion.getIssuer(), tenantDomain, false); if (idpEntityId == null || !assertion.getIssuer().equals(idpEntityId)) { if (log.isDebugEnabled()) { log.debug("SAML Token Issuer verification failed or Issuer not registered");
if (assertion.getIssuer() == null || assertion.getIssuer().isEmpty()) { if (log.isDebugEnabled()) { log.debug("Issuer is empty in the SAML assertion"); try { if (log.isDebugEnabled()) { log.debug("Issuer is :" + assertion.getIssuer()); assertion.getIssuer(), tenantDomain, false); if (idpEntityId == null || !assertion.getIssuer().equals(idpEntityId)) { if (log.isDebugEnabled()) { log.debug("SAML Token Issuer verification failed or Issuer not registered");