Skip to content
Permalink
Browse files
Applying patch from RAMPART-254
  • Loading branch information
Selvaratnam Uthaiyashankar committed Dec 22, 2010
1 parent fdfce9c commit 70be1d5758fdc17cf4ef158143288e32554b2a13
Showing 3 changed files with 22 additions and 12 deletions.
@@ -660,9 +660,9 @@ private AttributeStatement createAttributeStatement(RahasData data, SAMLTokenIss
Attribute[] attributes = null;

//Call the attribute callback handlers to get any attributes if exists
if (config.getCallbackHander() != null) {
if (config.getCallbackHandler() != null) {
SAMLAttributeCallback cb = new SAMLAttributeCallback(data);
SAMLCallbackHandler handler = config.getCallbackHander();
SAMLCallbackHandler handler = config.getCallbackHandler();
handler.handle(cb);
attributes = cb.getSAML2Attributes();
}
@@ -254,10 +254,10 @@ private SAMLAssertion createBearerAssertion(SAMLTokenIssuerConfig config,
// In the case where the principal is a UT
if (principal instanceof WSUsernameTokenPrincipal) {
SAMLNameIdentifier nameId = null;
if(config.getCallbackHander() != null){
if(config.getCallbackHandler() != null){
SAMLNameIdentifierCallback cb = new SAMLNameIdentifierCallback(data);
cb.setUserId(principal.getName());
SAMLCallbackHandler callbackHandler = config.getCallbackHander();
SAMLCallbackHandler callbackHandler = config.getCallbackHandler();
callbackHandler.handle(cb);
nameId = cb.getNameId();
}else{
@@ -432,9 +432,9 @@ private SAMLAssertion createAttributeAssertion(Document doc, RahasData data,


SAMLAttribute[] attrs = null;
if(config.getCallbackHander() != null){
if(config.getCallbackHandler() != null){
SAMLAttributeCallback cb = new SAMLAttributeCallback(data);
SAMLCallbackHandler handler = config.getCallbackHander();
SAMLCallbackHandler handler = config.getCallbackHandler();
handler.handle(cb);
attrs = cb.getAttributes();
} else if (config.getCallbackHandlerName() != null
@@ -98,7 +98,7 @@ public class SAMLTokenIssuerConfig extends AbstractIssuerConfig {
protected String issuerName;
protected Map trustedServices = new HashMap();
protected String trustStorePropFile;
protected SAMLCallbackHandler callbackHander;
protected SAMLCallbackHandler callbackHandler;
protected String callbackHandlerName;

/**
@@ -258,7 +258,7 @@ private void load(OMElement elem) throws TrustException {
try {
String value = attrElemet.getText();
Class handlerClass = Class.forName(value);
this.callbackHander = (SAMLCallbackHandler)handlerClass.newInstance();
this.callbackHandler = (SAMLCallbackHandler)handlerClass.newInstance();
} catch (ClassNotFoundException e) {
log.debug("Error loading class" , e);
throw new TrustException("Error loading class" , e);
@@ -302,7 +302,7 @@ public Parameter getParameter() {

OMElement timeToLive = fac.createOMElement(TTL, configElem);
timeToLive.setText(String.valueOf(this.ttl));

configElem.addChild(this.cryptoPropertiesElement);

OMElement keySizeElem = fac.createOMElement(KEY_SIZE, configElem);
@@ -408,12 +408,22 @@ public Map getTrustedServices() {
return trustedServices;
}

@Deprecated
public SAMLCallbackHandler getCallbackHander() {
return callbackHander;
return callbackHandler;
}

@Deprecated
public void setCallbackHander(SAMLCallbackHandler callbackHandler) {
this.callbackHandler = callbackHandler;
}

public SAMLCallbackHandler getCallbackHandler() {
return callbackHandler;
}

public void setCallbackHander(SAMLCallbackHandler callbackHander) {
this.callbackHander = callbackHander;
public void setCallbackHandler(SAMLCallbackHandler callbackHandler) {
this.callbackHandler = callbackHandler;
}

public String getCallbackHandlerName() {

0 comments on commit 70be1d5

Please sign in to comment.