Examples of RequestedSecurityToken


Examples of com.sun.xml.ws.security.trust.elements.RequestedSecurityToken

        // Create RequestedSecurityToken
        //========================================
       
        // Create RequestedSecurityToken
        final String assertionId = "uuid-" + UUID.randomUUID().toString();
        final RequestedSecurityToken reqSecTok = eleFac.createRequestedSecurityToken();
        final Token samlToken = createSAMLAssertion(appliesTo, tokenType, keyType, assertionId, stsConfig.getIssuer(), claimedAttrs, context);
        reqSecTok.setToken(samlToken);
       
        // Create RequestedAttachedReference and RequestedUnattachedReference
        String valueType = null;
        if (WSTrustConstants.SAML10_ASSERTION_TOKEN_TYPE.equals(tokenType)||
            WSTrustConstants.SAML11_ASSERTION_TOKEN_TYPE.equals(tokenType)){
View Full Code Here

Examples of com.sun.xml.ws.security.trust.elements.RequestedSecurityToken

            if (requestAppliesTo != null){
                appliesTo = WSTrustUtil.getAppliesToURI(requestAppliesTo);
            }
            //AppliesTo responseAppliesTo = rstr.getAppliesTo();
           
            final RequestedSecurityToken securityToken = rstr.getRequestedSecurityToken();
           
            // Requested References
            final RequestedAttachedReference attachedRef = rstr.getRequestedAttachedReference();
            final RequestedUnattachedReference unattachedRef = rstr.getRequestedUnattachedReference();
           
            // RequestedProofToken
            final RequestedProofToken proofToken = rstr.getRequestedProofToken();
           
            // Obtain the secret key for the context
            final byte[] key = getKey(wstVer, rstr, proofToken, rst, appliesTo);
           
            if(key != null){
                context.setProofKey(key);
            }
           
            //get the creation time and expires time and set it in the context
            setLifetime(rstr, context);
           
            // if securityToken == null and proofToken == null
            // throw exception
            if(securityToken == null && proofToken == null){
                log.log(Level.SEVERE,
                        LogStringsMessages.WST_0018_TOKENS_NULL(appliesTo));
                throw new WSTrustException(
                        LogStringsMessages.WST_0018_TOKENS_NULL(appliesTo));
            }
           
            if (securityToken != null){
                context.setSecurityToken(securityToken.getToken());
            }
           
            if(attachedRef != null){
                context.setAttachedSecurityTokenReference(attachedRef.getSTR());
            }
           
            if (unattachedRef != null){
                context.setUnAttachedSecurityTokenReference(unattachedRef.getSTR());
            }
        }else if (rst.getRequestType().toString().equals(wstVer.getValidateRequestTypeURI())){
            Status status = rstr.getStatus();
            context.getOtherProperties().put(IssuedTokenContext.STATUS, status);
            final RequestedSecurityToken securityToken = rstr.getRequestedSecurityToken();
            if (securityToken != null){
                 context.setSecurityToken(securityToken.getToken());
            }
        }
    }
View Full Code Here

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

   
    /////////////////////////////////////////////////////////////////////////////
    //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);
View Full Code Here

Examples of org.opensaml.ws.wsfed.RequestedSecurityToken

/** A thread-safe unmarshaller for {@link org.opensaml.ws.wsfed.RequestedSecurityToken} objects. */
public class RequestedSecurityTokenUnmarshaller extends AbstractXMLObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) {
        RequestedSecurityToken requestedSecurityToken = (RequestedSecurityToken) parentSAMLObject;
        requestedSecurityToken.getSecurityTokens().add(childSAMLObject);
    }
View Full Code Here

Examples of org.opensaml.ws.wsfed.RequestedSecurityToken

/** A thread-safe unmarshaller for {@link org.opensaml.ws.wsfed.RequestedSecurityToken} objects. */
public class RequestedSecurityTokenUnmarshaller extends AbstractXMLObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) {
        RequestedSecurityToken requestedSecurityToken = (RequestedSecurityToken) parentSAMLObject;
        requestedSecurityToken.getSecurityTokens().add(childSAMLObject);
    }
View Full Code Here

Examples of org.opensaml.ws.wstrust.RequestedSecurityToken

public class RequestedSecurityTokenUnmarshaller extends AbstractWSTrustObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        RequestedSecurityToken reqToken = (RequestedSecurityToken) parentXMLObject;
        reqToken.setUnknownXMLObject(childXMLObject);
    }
View Full Code Here

Examples of org.opensaml.ws.wstrust.RequestedSecurityToken

public class RequestedSecurityTokenUnmarshaller extends AbstractWSTrustObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        RequestedSecurityToken reqToken = (RequestedSecurityToken) parentXMLObject;
        reqToken.setUnknownXMLObject(childXMLObject);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.