X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=adfs%2Fadfs.cpp;h=b2be93ba107d22b8e285ae26a7d0afdb9b86ce65;hb=392d1448deb48beb75f219532ac248b4776f16db;hp=7fee451363fccb54a0ed20f50627a3fba80e4147;hpb=1bc4f3f102b55dcf1ae14dd268b1f1ef95ea924f;p=shibboleth%2Fsp.git diff --git a/adfs/adfs.cpp b/adfs/adfs.cpp index 7fee451..b2be93b 100644 --- a/adfs/adfs.cpp +++ b/adfs/adfs.cpp @@ -566,10 +566,12 @@ void ADFSConsumer::implementProtocol( if (!policy.isAuthenticated()) throw SecurityPolicyException("Unable to establish security of incoming assertion."); + const EntityDescriptor* entity = policy.getIssuerMetadata() ? dynamic_cast(policy.getIssuerMetadata()->getParent()) : NULL; + // Now do profile and core semantic validation to ensure we can use it for SSO. // Profile validator. time_t now = time(NULL); - saml1::AssertionValidator ssoValidator(application.getAudiences(), now); + saml1::AssertionValidator ssoValidator(application.getRelyingParty(entity)->getXMLString("entityID").second, application.getAudiences(), now); ssoValidator.validateAssertion(*token); if (!token->getConditions() || !token->getConditions()->getNotBefore() || !token->getConditions()->getNotOnOrAfter()) throw FatalProfileException("Assertion did not contain time conditions."); @@ -642,7 +644,7 @@ void ADFSConsumer::implementProtocol( httpRequest, httpResponse, now + lifetime.second, - policy.getIssuerMetadata() ? dynamic_cast(policy.getIssuerMetadata()->getParent()) : NULL, + entity, m_protocol.get(), nameid.get(), ssoStatement->getAuthenticationInstant() ? ssoStatement->getAuthenticationInstant()->getRawData() : NULL,