Package demo.sts.provider.cert

Examples of demo.sts.provider.cert.CertificateVerifierConfig


    @Ignore
    @Test
    public void testIssueDelegateWithCert() throws Exception {
        SAMLTokenIssueOperation id = new SAMLTokenIssueOperation();
        assertNotNull(id);
        CertificateVerifierConfig certificateVerifierConfig = new CertificateVerifierConfig();
        certificateVerifierConfig.setTrustCertAliases(Arrays.asList("cacert"));
        certificateVerifierConfig.setKeySignAlias(keySignAlias);
        certificateVerifierConfig.setKeySignPwd(keySignPwd);
        certificateVerifierConfig.setStorePath(storePath);
        certificateVerifierConfig.setStorePwd(storePwd);
        id.setCertificateVerifierConfig(certificateVerifierConfig);
        JAXBElement<byte[]> jX509Certificate = new JAXBElement<byte[]>(
                QName.valueOf("X509Certificate"), byte[].class,
                Base64Utility.decode(CERT_DATA));
View Full Code Here


    @Test
    public void testIssueDelegateWithCertWithWrongStorePass() throws Exception {
        SAMLTokenIssueOperation id = new SAMLTokenIssueOperation();

        CertificateVerifierConfig certificateVerifierConfig = new CertificateVerifierConfig();
        certificateVerifierConfig.setTrustCertAliases(Arrays.asList("cacert"));
        certificateVerifierConfig.setKeySignAlias(keySignAlias);
        certificateVerifierConfig.setKeySignPwd(keySignPwd);
        certificateVerifierConfig.setStorePath(storePath);
        certificateVerifierConfig.setStorePwd("xxx");
        id.setCertificateVerifierConfig(certificateVerifierConfig);
        JAXBElement<byte[]> jX509Certificate = new JAXBElement<byte[]>(
                QName.valueOf("X509Certificate"), byte[].class,
                Base64Utility.decode(CERT_DATA));
View Full Code Here

    @Test
    public void testIssueDelegateWithCertWithoutTokenProvidersAndTokenType() throws Exception {
        SAMLTokenIssueOperation id = new SAMLTokenIssueOperation();

        CertificateVerifierConfig certificateVerifierConfig = new CertificateVerifierConfig();
        certificateVerifierConfig.setTrustCertAliases(Arrays.asList("cacert"));
        certificateVerifierConfig.setKeySignAlias(keySignAlias);
        certificateVerifierConfig.setKeySignPwd(keySignPwd);
        certificateVerifierConfig.setStorePath(storePath);
        certificateVerifierConfig.setStorePwd(storePwd);
        id.setCertificateVerifierConfig(certificateVerifierConfig);
        JAXBElement<byte[]> jX509Certificate = new JAXBElement<byte[]>(
                QName.valueOf("X509Certificate"), byte[].class,
                Base64Utility.decode(CERT_DATA));
View Full Code Here

        UsernameToken token = new UsernameToken("joe", null, null, false, null, null);
        EasyMock.expect(ctx2.get(SecurityToken.class.getName())).andReturn(token).anyTimes();

       
        SAMLTokenIssueOperation id = new SAMLTokenIssueOperation();
        CertificateVerifierConfig certificateVerifierConfig = new CertificateVerifierConfig();
        certificateVerifierConfig.setTrustCertAliases(Arrays.asList("cacert"));
        certificateVerifierConfig.setKeySignAlias(keySignAlias);
        certificateVerifierConfig.setKeySignPwd(keySignPwd);
        certificateVerifierConfig.setStorePath(storePath);
        certificateVerifierConfig.setStorePwd(storePwd);
        id.setCertificateVerifierConfig(certificateVerifierConfig);

        JAXBElement<String> tokenType = new JAXBElement<String>(
                new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512",
                        "TokenType"), String.class,
View Full Code Here

    }

    @Test
    public void testIssueDelegateWrongSignKey() {
        SAMLTokenIssueOperation id = new SAMLTokenIssueOperation();
        CertificateVerifierConfig certificateVerifierConfig = new CertificateVerifierConfig();
        certificateVerifierConfig.setTrustCertAliases(Arrays.asList("cacert"));
        certificateVerifierConfig.setKeySignAlias(keySignAlias);
        certificateVerifierConfig.setKeySignPwd("xxx");
        certificateVerifierConfig.setStorePath(storePath);
        certificateVerifierConfig.setStorePwd(storePwd);
        id.setCertificateVerifierConfig(certificateVerifierConfig);

        JAXBElement<String> tokenType = new JAXBElement<String>(new QName(
                "http://docs.oasis-open.org/ws-sx/ws-trust/200512",
                "TokenType"), String.class,
View Full Code Here

    }

    @Test
    public void testIssueDelegateWrongSignAlias() {
        SAMLTokenIssueOperation id = new SAMLTokenIssueOperation();
        CertificateVerifierConfig certificateVerifierConfig = new CertificateVerifierConfig();
        certificateVerifierConfig.setTrustCertAliases(Arrays.asList("cacert"));
        certificateVerifierConfig.setKeySignAlias("xxx");
        certificateVerifierConfig.setKeySignPwd(keySignPwd);
        certificateVerifierConfig.setStorePath(storePath);
        certificateVerifierConfig.setStorePwd(storePwd);
        id.setCertificateVerifierConfig(certificateVerifierConfig);

        JAXBElement<String> tokenType = new JAXBElement<String>(new QName(
                "http://docs.oasis-open.org/ws-sx/ws-trust/200512",
                "TokenType"), String.class,
View Full Code Here

TOP

Related Classes of demo.sts.provider.cert.CertificateVerifierConfig

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.