Package com.cloudseal.client.saml2

Examples of com.cloudseal.client.saml2.AuthResponseValidatorTests


        InputStream keystoreIs = keystore.getInputStream();
        byte[] keystoreData = IOUtils.toByteArray(keystoreIs);
        IOUtils.closeQuietly(keystoreIs);

        SamlConfig authRequestContext = new SamlConfig();
        authRequestContext.setKeystore(keystoreData);
        authRequestContext.setKeyName(keyName);
        authRequestContext.setKeystorePassword(keystorePassword);
        authRequestContext.setKeyPassword(keyPassword);
        if (appId != null && appId.length() > 0) {
            authRequestContext.setProviderName(appId);
        }

        authRequestBuilder.init(authRequestContext);
    }
View Full Code Here


    @Override
    public void afterPropertiesSet() throws Exception {
        Assert.notNull(cloudsealManager, "cloudsealManager must be set");
        if (responseValidator == null) {
            responseValidator = new SamlValidatorImpl();
        }
    }
View Full Code Here

    @Test
    public void testUnsuccessfulAuthentication() throws VerificationException {
        CloudsealAssertionAuthenticationToken token = new CloudsealAssertionAuthenticationToken("http://localhost:8080/saml/sp", "123", "SAMLResponse");
        when(cloudsealManager.getPublicKey()).thenReturn(publicKey);
        when(authResponseValidator.validateAuthResponse(any(PublicKey.class), anyString(), anyString(), anyString())).thenThrow(new VerificationException("oops"));
        classUnderTest.setCloudsealManager(cloudsealManager);
        classUnderTest.setResponseValidator(authResponseValidator);

        try {
            classUnderTest.authenticate(token);
View Full Code Here

TOP

Related Classes of com.cloudseal.client.saml2.AuthResponseValidatorTests

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.