Package com.sun.xml.ws.security.opt.api.keyinfo

Examples of com.sun.xml.ws.security.opt.api.keyinfo.SecurityTokenReference


        KeyInfo keyInfo = null;
        final KeyIdentifier keyIdentifier = wef.createKeyIdentifier();
        keyIdentifier.setValueType(MessageConstants.X509SubjectKeyIdentifier_NS);
        keyIdentifier.updateReferenceValue(cert);
        keyIdentifier.setEncodingType(MessageConstants.BASE64_ENCODING_NS);
        final SecurityTokenReference str = wef.createSecurityTokenReference(keyIdentifier);
        keyInfo = wef.createKeyInfo((com.sun.xml.ws.security.opt.impl.keyinfo.SecurityTokenReference) str);
       
        return wef.createEncryptedKey(null,MessageConstants.RSA_OAEP_KEY_TRANSPORT,keyInfo,cert.getPublicKey(),key);
    }
View Full Code Here


        boolean contentOnly = target.getContentOnly();
        Object header = context.getSecurityHeader().getChildElement(target.getValue());
        if(header != null){
           
            if(header instanceof SecurityTokenReference){
                SecurityTokenReference str = (SecurityTokenReference)header;
                Reference reference = str.getReference();
                String refValue = null;
                if(MessageConstants.KEY_INDETIFIER_TYPE.equals(reference.getType())){
                    refValue = ((KeyIdentifier)reference).getReferenceValue();
                } else if(MessageConstants.DIRECT_REFERENCE_TYPE.equals(reference.getType())){
                    refValue = ((DirectReference)reference).getURI();
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.security.opt.api.keyinfo.SecurityTokenReference

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.