[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml: saml1/profile/impl/Add...

noreply at shibboleth.net noreply at shibboleth.net
Sat Jun 21 18:34:53 EDT 2014


Author: scantor
Date: Sat Jun 21 18:34:52 2014
New Revision: 6140

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6140&view=rev
Log:
Do a better job of reflecting back the right authentication method.

Modified:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAuthenticationStatementToAssertion.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnStatementToAssertion.java

Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAuthenticationStatementToAssertion.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAuthenticationStatementToAssertion.java?rev=6140&r1=6139&r2=6140&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAuthenticationStatementToAssertion.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAuthenticationStatementToAssertion.java Sat Jun 21 18:34:52 2014
@@ -268,7 +268,8 @@
         final AuthenticationStatement statement = statementBuilder.buildObject();
         statement.setAuthenticationInstant(new DateTime(authenticationResult.getAuthenticationInstant()));
         
-        if (requestedPrincipalContext != null && requestedPrincipalContext.getMatchingPrincipal() != null) {
+        if (requestedPrincipalContext != null && requestedPrincipalContext.getMatchingPrincipal() != null
+                && requestedPrincipalContext.getMatchingPrincipal() instanceof AuthenticationMethodPrincipal) {
             statement.setAuthenticationMethod(requestedPrincipalContext.getMatchingPrincipal().getName());
         } else {
             statement.setAuthenticationMethod(methodLookupStrategy.apply(profileRequestContext).getName());

Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnStatementToAssertion.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnStatementToAssertion.java?rev=6140&r1=6139&r2=6140&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnStatementToAssertion.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnStatementToAssertion.java Sat Jun 21 18:34:52 2014
@@ -305,8 +305,8 @@
                 authnContext.setAuthnContextDeclRef(
                         ((AuthnContextDeclRefPrincipal) matchingPrincipal).getAuthnContextDeclRef());
             } else {
-                authnContext.setAuthnContextClassRef(new AuthnContextClassRefPrincipal(
-                        AuthnContext.UNSPECIFIED_AUTHN_CTX).getAuthnContextClassRef());
+                authnContext.setAuthnContextClassRef(
+                        classRefLookupStrategy.apply(profileRequestContext).getAuthnContextClassRef());
             }
         } else {
             authnContext.setAuthnContextClassRef(



More information about the commits mailing list