Package org.apache.ws.sandbox.security.trust.message.token

Examples of org.apache.ws.sandbox.security.trust.message.token.TokenType


   */
  public Document issue(Document req, Document res) throws Exception {
 
   
    Element elemTokenType=(Element)WSSecurityUtil.findElement(req,TokenType.TOKEN.getLocalPart(),TokenType.TOKEN.getNamespaceURI());
    TokenType tokenType=new TokenType(elemTokenType);
   
    Element elemRequestType=(Element)WSSecurityUtil.findElement(req,RequestType.TOKEN.getLocalPart(),RequestType.TOKEN.getNamespaceURI());
    RequestType requestType=new RequestType(elemRequestType);
   
    Element elemBase=(Element)WSSecurityUtil.findElement(req,BaseToken.TOKEN.getLocalPart(),BaseToken.TOKEN.getNamespaceURI());
    BaseToken base=new BaseToken(elemBase);   
   
    BinarySecurity binarySecurity=STSUtil.findBinarySecurityToken(req);
    //x509=new X509Security(binarySecurity.getElement());
    Element sct=this.getSecuritContextToken(res,x509);   
   
    /////////////////////////////////////////////////////////////////////////////
    //Now we build the response
    RequestSecurityTokenResponse requestSecurityTokenResponse=new RequestSecurityTokenResponse(res);
   
    RequestedSecurityToken requestedSecurityToken=new RequestedSecurityToken(res);
    //Token Type
    TokenType tokenTypeRes=new TokenType(res);
    tokenTypeRes.setValue(tokenType.getValue());
    //Request Type
    RequestType requestTypeRes=new RequestType(res);
    requestTypeRes.setValue(requestType.getValue());

    //It is RECOMMENDED that the issuer return this element with issued tokens so the
View Full Code Here

TOP

Related Classes of org.apache.ws.sandbox.security.trust.message.token.TokenType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.