Examples of WSUsernameTokenPrincipalImpl


Examples of org.apache.wss4j.common.principal.WSUsernameTokenPrincipalImpl

    ) throws Base64DecodingException {
        boolean hashed = false;
        if (WSConstants.PASSWORD_DIGEST.equals(passwordType)) {
            hashed = true;
        }
        WSUsernameTokenPrincipalImpl principal = new WSUsernameTokenPrincipalImpl(username, hashed);
        principal.setNonce(Base64.decode(nonce));
        principal.setPassword(passwordValue);
        principal.setCreatedTime(createdTime);
        principal.setPasswordType(passwordType);
        return principal;
    }
View Full Code Here

Examples of org.apache.wss4j.common.principal.WSUsernameTokenPrincipalImpl

                    result.put(WSSecurityEngineResult.TAG_PRINCIPAL, samlPrincipal);
                }
            } else if (credential.getPrincipal() != null) {
                result.put(WSSecurityEngineResult.TAG_PRINCIPAL, credential.getPrincipal());
            } else {
                WSUsernameTokenPrincipalImpl principal =
                    new WSUsernameTokenPrincipalImpl(token.getName(), token.isHashed());
                principal.setNonce(Base64.decodeBase64(token.getNonce()));
                principal.setPassword(token.getPassword());
                principal.setCreatedTime(token.getCreated());
                principal.setPasswordType(token.getPasswordType());
                result.put(WSSecurityEngineResult.TAG_PRINCIPAL, principal);
            }
            result.put(WSSecurityEngineResult.TAG_SUBJECT, credential.getSubject());
        }
       
View Full Code Here

Examples of org.apache.wss4j.common.principal.WSUsernameTokenPrincipalImpl

    /**
     * Create a WSUsernameTokenPrincipal from this UsernameToken object
     */
    public Principal createPrincipal() throws WSSecurityException {
        try {
            WSUsernameTokenPrincipalImpl principal =
                new WSUsernameTokenPrincipalImpl(getName(), isHashed());
            principal.setNonce(Base64.decode(getNonce()));
            principal.setPassword(getPassword());
            principal.setCreatedTime(getCreated());
            return principal;
        } catch (Base64DecodingException e) {
            throw new WSSecurityException(
                    WSSecurityException.ErrorCode.FAILURE, "decoding.general", e
            );
View Full Code Here

Examples of org.apache.wss4j.common.principal.WSUsernameTokenPrincipalImpl

    /**
     * Create a WSUsernameTokenPrincipal from this UsernameToken object
     */
    public Principal createPrincipal() throws WSSecurityException {
        try {
            WSUsernameTokenPrincipalImpl principal =
                new WSUsernameTokenPrincipalImpl(getName(), isHashed());
            principal.setNonce(Base64.decode(getNonce()));
            principal.setPassword(getPassword());
            principal.setCreatedTime(getCreated());
            return principal;
        } catch (Base64DecodingException e) {
            throw new WSSecurityException(
                    WSSecurityException.ErrorCode.FAILURE, "decoding.general", e
            );
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.