Author: anil.saldhana(a)jboss.com
Date: 2011-08-08 13:09:25 -0400 (Mon, 08 Aug 2011)
New Revision: 1157
Modified:
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectSignatureFormAuthenticator.java
Log:
PLFED-220: allow users to configure idp validating alias
Modified:
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectSignatureFormAuthenticator.java
===================================================================
---
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectSignatureFormAuthenticator.java 2011-08-08
15:10:40 UTC (rev 1156)
+++
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectSignatureFormAuthenticator.java 2011-08-08
17:09:25 UTC (rev 1157)
@@ -46,6 +46,7 @@
import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
import org.picketlink.identity.federation.core.saml.v2.util.SignatureUtil;
import org.picketlink.identity.federation.core.util.CoreConfigUtil;
+import org.picketlink.identity.federation.core.util.StringUtil;
import org.picketlink.identity.federation.core.util.XMLEncryptionUtil;
import org.picketlink.identity.federation.saml.v2.assertion.EncryptedElementType;
import org.picketlink.identity.federation.saml.v2.protocol.ResponseType;
@@ -68,11 +69,18 @@
private TrustKeyManager keyManager;
+ protected String validatingAlias = null;
+
public SPRedirectSignatureFormAuthenticator()
{
super();
}
+ public void setValidatingAlias(String validatingAlias)
+ {
+ this.validatingAlias = validatingAlias;
+ }
+
@Override
public void start() throws LifecycleException
{
@@ -147,7 +155,11 @@
PublicKey validatingKey;
try
{
- validatingKey = keyManager.getValidatingKey(request.getRemoteAddr());
+ if (StringUtil.isNullOrEmpty(validatingAlias))
+ {
+ validatingAlias = request.getRemoteAddr();
+ }
+ validatingKey = keyManager.getValidatingKey(validatingAlias);
}
catch (TrustKeyConfigurationException e)
{
Show replies by date