[jboss-dev-forums] [JBoss Identity Development] - Re: AppliesTo support for STSClient (previously WSTrustClien

beve do-not-reply at jboss.com
Mon Sep 28 03:47:33 EDT 2009


Hi Stefan, 

great, then I'll go ahead and add this :)

When reading the WS-Trust spec I noticed that TokenType and AppliesTo are option but one of them 'SHOULD' be specified and this is also verified by the StandardRequestHandler. 
How about having the ability to specify both though, would this be a valid option for a client? 

One example is for the ESB where we have an action that can be configured with either a TokenType or an EndpointURI. We will need to check that one or the other has been specified and then call the appropriate method. But if there was a method like the following no checks would be needed and it would only be one method call:
public Element issueToken(String endpointURI, String tokenType) throws WSTrustException
  | {
  | 	if (endpointURI == null && tokenType == null)
  | 	{
  | 		throw new WSTrustException("Either endpointURI or tokenType must be specified");
  | 	}
  |         RequestSecurityToken request = new RequestSecurityToken();
  |         setAppliesTo(endpointURI, request);
  |         setTokenType(tokenType, request);
  |         return issueToken(request);
  | }
  | 
What do you think, is it worth adding such a convenience method?

Thanks,

/Daniel


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257251#4257251

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257251



More information about the jboss-dev-forums mailing list