[java-identity-provider COMMIT] /trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingpart...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Jan 7 05:05:25 EST 2015
Author: rdw
Date: Wed Jan 7 05:05:25 2015
New Revision: 7236
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7236&view=rev
Log:
IDP-563 Add warning when we encounter a defaultAuthenticationMethod in any relying party.
Modified:
trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/AbstractRelyingPartyParser.java
Modified: trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/AbstractRelyingPartyParser.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/AbstractRelyingPartyParser.java?rev=7236&r1=7235&r2=7236&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/AbstractRelyingPartyParser.java (original)
+++ trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/AbstractRelyingPartyParser.java Wed Jan 7 05:05:25 2015
@@ -26,6 +26,8 @@
import net.shibboleth.utilities.java.support.primitive.StringSupport;
import net.shibboleth.utilities.java.support.xml.ElementSupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
@@ -35,13 +37,16 @@
/**
* Parser for the common parts of <AnonymousRelyingParty> <DefaultRelyingParty> and <RelyingParty>.
* Implementations only differ by being named or not (for reference elsewhere) and by the
- * {@link com.google.common.base.Predicate} which is injected.
+ * {@link com.google.common.base.Predicate} which is injected.
*/
public abstract class AbstractRelyingPartyParser extends AbstractSingleBeanDefinitionParser {
/** Element name. */
public static final QName PROFILE_CONFIGURATION = new QName(RelyingPartyNamespaceHandler.NAMESPACE,
"ProfileConfiguration");
+
+ /** log. */
+ private Logger log = LoggerFactory.getLogger(AbstractRelyingPartyParser.class);
/** {@inheritDoc} */
@Override protected java.lang.Class<RelyingPartyConfiguration> getBeanClass(Element element) {
@@ -53,24 +58,27 @@
builder.setLazyInit(true);
super.doParse(element, parserContext, builder);
- // defaultSigningCredentialRef
- // defaultAuthenticationMethod and nameIDFormatPrecedence is dealt with in the specific SSO
- // profileConfigurations
+ // defaultSigningCredentialRef, defaultAuthenticationMethod and nameIDFormatPrecedence are dealt with
+ // in the specific SSO profileConfigurations.
+ // IDP-563: defaultAuthenticationMethod had weird semantics in V2. Warn.
+ if (element.hasAttributeNS(null, "defaultAuthenticationMethod")) {
+ log.warn("Specific authentication methods may not work for all profiles. defaultAuthenticationMethod='{}'",
+ element.getAttributeNS(null, "defaultAuthenticationMethod"));
+ }
final String provider = StringSupport.trimOrNull(element.getAttributeNS(null, "provider"));
builder.addPropertyValue("responderId", provider);
-
-
+
final String detailedErrors = StringSupport.trimOrNull(element.getAttributeNS(null, "detailedErrors"));
if (null != detailedErrors) {
builder.addPropertyValue("detailedErrors", detailedErrors);
}
-
+
final List<BeanDefinition> profileConfigurations =
SpringSupport.parseCustomElements(ElementSupport.getChildElements(element, PROFILE_CONFIGURATION),
parserContext);
builder.addPropertyValue("profileConfigurations", profileConfigurations);
-
+
builder.setInitMethodName("initialize");
builder.setDestroyMethodName("destroy");
}
More information about the commits
mailing list