Author: coheigea
Date: Thu Feb 13 16:32:51 2014
New Revision: 1567973
URL: http://svn.apache.org/r1567973
Log:
Added a way to set Properties on the Fediz IdP STSClient.
Modified:
cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
Modified:
cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
URL:
http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java?rev=1567973&r1=1567972&r2=1567973&view=diff
==============================================================================
---
cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
(original)
+++
cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
Thu Feb 13 16:32:51 2014
@@ -77,6 +77,8 @@ public class STSAuthenticationProvider i
//Required to get IDP roles to use the IDP application, used in future
release
protected String roleURI;
+ protected Map<String, Object> properties = new HashMap<String, Object>();
+
@Override
public Authentication authenticate(Authentication authentication) throws
AuthenticationException {
@@ -100,6 +102,7 @@ public class STSAuthenticationProvider i
wsdlEndpoint));
sts.getProperties().put(SecurityConstants.USERNAME,
authentication.getName());
sts.getProperties().put(SecurityConstants.PASSWORD,
(String)authentication.getCredentials());
+ sts.getProperties().putAll(properties);
if (lifetime != null) {
sts.setEnableLifetime(true);
@@ -311,6 +314,14 @@ public class STSAuthenticationProvider i
public void setRoleURI(String roleURI) {
this.roleURI = roleURI;
}
+
+ public void setProperties(Map<String, Object> p) {
+ properties.putAll(p);
+ }
+
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
//May be uncommented for debugging
// private void setTimeout(Client client, Long timeout) {