Package org.openengsb.domain.authentication

Examples of org.openengsb.domain.authentication.AuthenticationDomain


            OBJECT_MAPPER.convertValue(methodResult.getArg(), Class.forName(methodResult.getClassName()));
        assertThat(realResultArg, equalTo((Object) new TestClass("test")));
    }

    private FilterChain createSecureFilterChain() throws Exception {
        AuthenticationDomain authenticationManager = mock(AuthenticationDomain.class);
        when(authenticationManager.authenticate(anyString(), any(Credentials.class))).thenAnswer(
            new Answer<Authentication>() {
                @Override
                public Authentication answer(InvocationOnMock invocation) throws Throwable {
                    String user = (String) invocation.getArguments()[0];
                    Password credentials = (Password) invocation.getArguments()[1];
View Full Code Here


        testConnectorId = "test-connector-instance";
        wiringService = defaultWiringService;
    }

    private void setupSecurityManager() throws AuthenticationException {
        AuthenticationDomain authManager = mock(AuthenticationDomain.class);
        when(authManager.authenticate(anyString(), any(Credentials.class))).thenAnswer(new Answer<Authentication>() {
            @Override
            public Authentication answer(InvocationOnMock invocation) throws Throwable {
                String username = (String) invocation.getArguments()[0];
                Credentials credentials = (Credentials) invocation.getArguments()[1];
                return new Authentication(username, credentials);
View Full Code Here

            Iterator<AuthenticationDomain> serviceIterator =
                utilsService.getServiceIterator(providers, AuthenticationDomain.class);
            AuthenticationException lastException = null;
            LOGGER.debug("iterating {} authenticationProviderServices", providers.size());
            while (serviceIterator.hasNext()) {
                AuthenticationDomain provider = serviceIterator.next();
                if (provider.supports(credentials)) {
                    LOGGER.info("attempting authentication using provider {}", provider.getClass());
                    try {
                        return provider.authenticate(username, credentials);
                    } catch (AuthenticationException e) {
                        lastException = e;
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.openengsb.domain.authentication.AuthenticationDomain

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.