Package org.apache.cxf.sts.request

Examples of org.apache.cxf.sts.request.Entropy


        TokenProvider samlTokenProvider = new SAMLTokenProvider();
        TokenProviderParameters providerParameters =
            createProviderParameters(WSConstants.WSS_SAML_TOKEN_TYPE, STSConstants.SYMMETRIC_KEY_KEYTYPE);
        assertTrue(samlTokenProvider.canHandleToken(WSConstants.WSS_SAML_TOKEN_TYPE));
       
        Entropy entropy = new Entropy();
        BinarySecret binarySecret = new BinarySecret();
        binarySecret.setBinarySecretValue(WSSecurityUtil.generateNonce(256 / 8));
        entropy.setBinarySecret(binarySecret);
        providerParameters.getKeyRequirements().setEntropy(entropy);
       
        binarySecret.setBinarySecretType("bad-type");
        try {
            samlTokenProvider.createToken(providerParameters);
View Full Code Here


        TokenProvider samlTokenProvider = new SAMLTokenProvider();
        TokenProviderParameters providerParameters =
            createProviderParameters(WSConstants.WSS_SAML_TOKEN_TYPE, STSConstants.SYMMETRIC_KEY_KEYTYPE);
        assertTrue(samlTokenProvider.canHandleToken(WSConstants.WSS_SAML_TOKEN_TYPE));
       
        Entropy entropy = new Entropy();
        BinarySecret binarySecret = new BinarySecret();
        binarySecret.setBinarySecretValue(WSSecurityUtil.generateNonce(256 / 8));
        entropy.setBinarySecret(binarySecret);
        providerParameters.getKeyRequirements().setEntropy(entropy);
       
        TokenProviderResponse providerResponse = samlTokenProvider.createToken(providerParameters);
        assertTrue(providerResponse != null);
        assertTrue(providerResponse.getToken() != null && providerResponse.getTokenId() != null);
View Full Code Here

        TokenProvider samlTokenProvider = new SAMLTokenProvider();
        TokenProviderParameters providerParameters =
            createProviderParameters(WSConstants.WSS_SAML2_TOKEN_TYPE, STSConstants.SYMMETRIC_KEY_KEYTYPE);
        assertTrue(samlTokenProvider.canHandleToken(WSConstants.WSS_SAML2_TOKEN_TYPE));
       
        Entropy entropy = new Entropy();
        BinarySecret binarySecret = new BinarySecret();
        binarySecret.setBinarySecretValue(WSSecurityUtil.generateNonce(256 / 8));
        entropy.setBinarySecret(binarySecret);
        providerParameters.getKeyRequirements().setEntropy(entropy);
       
        binarySecret.setBinarySecretType("bad-type");
        try {
            samlTokenProvider.createToken(providerParameters);
View Full Code Here

        TokenProvider samlTokenProvider = new SAMLTokenProvider();
        TokenProviderParameters providerParameters =
            createProviderParameters(WSConstants.WSS_SAML_TOKEN_TYPE, STSConstants.SYMMETRIC_KEY_KEYTYPE);
        assertTrue(samlTokenProvider.canHandleToken(WSConstants.WSS_SAML_TOKEN_TYPE));
       
        Entropy entropy = new Entropy();
        BinarySecret binarySecret = new BinarySecret();
        binarySecret.setBinarySecretValue(WSSecurityUtil.generateNonce(256 / 8));
        entropy.setBinarySecret(binarySecret);
        providerParameters.getKeyRequirements().setEntropy(entropy);
       
        binarySecret.setBinarySecretType("bad-type");
        try {
            samlTokenProvider.createToken(providerParameters);
View Full Code Here

        TokenProvider samlTokenProvider = new SAMLTokenProvider();
        TokenProviderParameters providerParameters =
            createProviderParameters(WSConstants.WSS_SAML_TOKEN_TYPE, STSConstants.SYMMETRIC_KEY_KEYTYPE);
        assertTrue(samlTokenProvider.canHandleToken(WSConstants.WSS_SAML_TOKEN_TYPE));
       
        Entropy entropy = new Entropy();
        BinarySecret binarySecret = new BinarySecret();
        binarySecret.setBinarySecretValue(WSSecurityUtil.generateNonce(256 / 8));
        entropy.setBinarySecret(binarySecret);
        providerParameters.getKeyRequirements().setEntropy(entropy);
       
        TokenProviderResponse providerResponse = samlTokenProvider.createToken(providerParameters);
        assertTrue(providerResponse != null);
        assertTrue(providerResponse.getToken() != null && providerResponse.getTokenId() != null);
View Full Code Here

        TokenProvider samlTokenProvider = new SAMLTokenProvider();
        TokenProviderParameters providerParameters =
            createProviderParameters(WSConstants.WSS_SAML2_TOKEN_TYPE, STSConstants.SYMMETRIC_KEY_KEYTYPE);
        assertTrue(samlTokenProvider.canHandleToken(WSConstants.WSS_SAML2_TOKEN_TYPE));
       
        Entropy entropy = new Entropy();
        BinarySecret binarySecret = new BinarySecret();
        binarySecret.setBinarySecretValue(WSSecurityUtil.generateNonce(256 / 8));
        entropy.setBinarySecret(binarySecret);
        providerParameters.getKeyRequirements().setEntropy(entropy);
       
        binarySecret.setBinarySecretType("bad-type");
        try {
            samlTokenProvider.createToken(providerParameters);
View Full Code Here

        TokenProvider samlTokenProvider = new SAMLTokenProvider();
        TokenProviderParameters providerParameters =
            createProviderParameters(WSConstants.WSS_SAML_TOKEN_TYPE, STSConstants.SYMMETRIC_KEY_KEYTYPE);
        assertTrue(samlTokenProvider.canHandleToken(WSConstants.WSS_SAML_TOKEN_TYPE));
       
        Entropy entropy = new Entropy();
        entropy.setBinarySecretValue(WSSecurityUtil.generateNonce(256 / 8));
        providerParameters.getKeyRequirements().setEntropy(entropy);
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on no type");
        } catch (STSException ex) {
            // expected as no type is provided
        }
       
        entropy.setBinarySecretType("bad-type");
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on a bad type");
        } catch (STSException ex) {
            // expected as no type is provided
        }
       
        entropy.setBinarySecretType(STSConstants.NONCE_TYPE);
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on no computed key algorithm");
        } catch (STSException ex) {
            // expected as no computed key algorithm is provided
View Full Code Here

        TokenProvider samlTokenProvider = new SAMLTokenProvider();
        TokenProviderParameters providerParameters =
            createProviderParameters(WSConstants.WSS_SAML2_TOKEN_TYPE, STSConstants.SYMMETRIC_KEY_KEYTYPE);
        assertTrue(samlTokenProvider.canHandleToken(WSConstants.WSS_SAML2_TOKEN_TYPE));
       
        Entropy entropy = new Entropy();
        entropy.setBinarySecretValue(WSSecurityUtil.generateNonce(256 / 8));
        providerParameters.getKeyRequirements().setEntropy(entropy);
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on no type");
        } catch (STSException ex) {
            // expected as no type is provided
        }
       
        entropy.setBinarySecretType("bad-type");
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on a bad type");
        } catch (STSException ex) {
            // expected as no type is provided
        }
       
        entropy.setBinarySecretType(STSConstants.NONCE_TYPE);
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on no computed key algorithm");
        } catch (STSException ex) {
            // expected as no computed key algorithm is provided
View Full Code Here

        TokenProvider samlTokenProvider = new SAMLTokenProvider();
        TokenProviderParameters providerParameters =
            createProviderParameters(WSConstants.WSS_SAML_TOKEN_TYPE, STSConstants.SYMMETRIC_KEY_KEYTYPE);
        assertTrue(samlTokenProvider.canHandleToken(WSConstants.WSS_SAML_TOKEN_TYPE));
       
        Entropy entropy = new Entropy();
        entropy.setBinarySecretValue(WSSecurityUtil.generateNonce(256 / 8));
        providerParameters.getKeyRequirements().setEntropy(entropy);
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on no type");
        } catch (STSException ex) {
            // expected as no type is provided
        }
       
        entropy.setBinarySecretType("bad-type");
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on a bad type");
        } catch (STSException ex) {
            // expected as no type is provided
        }
       
        entropy.setBinarySecretType(STSConstants.NONCE_TYPE);
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on no computed key algorithm");
        } catch (STSException ex) {
            // expected as no computed key algorithm is provided
View Full Code Here

        TokenProvider samlTokenProvider = new SAMLTokenProvider();
        TokenProviderParameters providerParameters =
            createProviderParameters(WSConstants.WSS_SAML2_TOKEN_TYPE, STSConstants.SYMMETRIC_KEY_KEYTYPE);
        assertTrue(samlTokenProvider.canHandleToken(WSConstants.WSS_SAML2_TOKEN_TYPE));
       
        Entropy entropy = new Entropy();
        entropy.setBinarySecretValue(WSSecurityUtil.generateNonce(256 / 8));
        providerParameters.getKeyRequirements().setEntropy(entropy);
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on no type");
        } catch (STSException ex) {
            // expected as no type is provided
        }
       
        entropy.setBinarySecretType("bad-type");
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on a bad type");
        } catch (STSException ex) {
            // expected as no type is provided
        }
       
        entropy.setBinarySecretType(STSConstants.NONCE_TYPE);
        try {
            samlTokenProvider.createToken(providerParameters);
            fail("Failure expected on no computed key algorithm");
        } catch (STSException ex) {
            // expected as no computed key algorithm is provided
View Full Code Here

TOP

Related Classes of org.apache.cxf.sts.request.Entropy

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.