Package org.apache.isis.core.runtime.authentication.standard

Examples of org.apache.isis.core.runtime.authentication.standard.AuthenticationManagerStandard


     * all requests.
     */
    private AuthenticationManager anonymousAuthenticationManager() {
        if (authenticationManager == null) {
            final IsisConfiguration configuration = IsisContext.getConfiguration();
            final AuthenticationManagerStandard authenticationManager = new AuthenticationManagerStandard(configuration);
            authenticationManager.addAuthenticator(new AuthenticatorAbstract(configuration) {
                @Override
                public boolean isValid(final AuthenticationRequest request) {
                    return true;
                }

                @Override
                public boolean canAuthenticate(final Class<? extends AuthenticationRequest> authenticationRequestClass) {
                    return true;
                }
            });
            authenticationManager.init();
            this.authenticationManager = authenticationManager;
        }
        return authenticationManager;
    }
View Full Code Here


    /**
     * The standard authentication manager, configured with the default authenticator (allows all requests through).
     */
    @Override
    protected AuthenticationManager obtainAuthenticationManager(DeploymentType deploymentType) throws IsisSystemException {
        final AuthenticationManagerStandard authenticationManager = new AuthenticationManagerStandard(getConfiguration());
        Authenticator authenticator = new AuthenticatorBypass(configuration);
        authenticationManager.addAuthenticator(authenticator);
        return authenticationManager;
    }
View Full Code Here

    /**
     * The standard authentication manager, configured with the default authenticator (allows all requests through).
     */
    @Override
    protected AuthenticationManager obtainAuthenticationManager(DeploymentType deploymentType) throws IsisSystemException {
        final AuthenticationManagerStandard authenticationManager = new AuthenticationManagerStandard(getConfiguration());
        Authenticator authenticator = new AuthenticatorBypass(configuration);
        authenticationManager.addAuthenticator(authenticator);
        return authenticationManager;
    }
View Full Code Here

     * all requests.
     */
    private AuthenticationManager anonymousAuthenticationManager() {
        if (authenticationManager == null) {
            final IsisConfiguration configuration = IsisContext.getConfiguration();
            final AuthenticationManagerStandard authenticationManager = new AuthenticationManagerStandard(configuration);
            authenticationManager.addAuthenticator(new AuthenticatorAbstract(configuration) {
                @Override
                public boolean isValid(final AuthenticationRequest request) {
                    return true;
                }

                @Override
                public boolean canAuthenticate(final Class<? extends AuthenticationRequest> authenticationRequestClass) {
                    return true;
                }
            });
            authenticationManager.init();
            this.authenticationManager = authenticationManager;
        }
        return authenticationManager;
    }
View Full Code Here

        mockConfiguration = mockery.mock(IsisConfiguration.class);
        mockRandomCodeGenerator = mockery.mock(RandomCodeGenerator.class);
        mockAuthenticator = mockery.mock(Authenticator.class);
        mockAuthSession = mockery.mock(AuthenticationSession.class);

        authenticationManager = new AuthenticationManagerStandard(mockConfiguration);
        authenticationManager.addAuthenticator(mockAuthenticator);
        authenticationManager.setRandomCodeGenerator(mockRandomCodeGenerator);

        mockery.checking(new Expectations() {
            {
View Full Code Here

    @Before
    public void setUp() throws Exception {
        mockConfiguration = mockery.mock(IsisConfiguration.class);
        mockAuthenticator = mockery.mock(Authenticator.class);
        authenticationManager = new AuthenticationManagerStandard(mockConfiguration);
    }
View Full Code Here

     * Lazily creates an {@link AuthenticationManager} that will authenticate all requests.
     */
    private AuthenticationManager anonymousAuthenticationManager() {
        if (authenticationManager == null) {
            final IsisConfiguration configuration = IsisContext.getConfiguration();
            final AuthenticationManagerStandard authenticationManager =
                new AuthenticationManagerStandard(configuration);
            authenticationManager.addAuthenticator(new AuthenticatorAbstract(configuration) {
                @Override
                public boolean canAuthenticate(final AuthenticationRequest request) {
                    return true;
                }

                @Override
                public boolean isValid(final AuthenticationRequest request) {
                    return true;
                }
            });
            authenticationManager.init();
            this.authenticationManager = authenticationManager;
        }
        return authenticationManager;
    }
View Full Code Here

    @Before
    public void setUp() throws Exception {
        mockConfiguration = mockery.mock(IsisConfiguration.class);
        mockAuthenticator = mockery.mock(Authenticator.class);
        authenticationManager = new AuthenticationManagerStandard(mockConfiguration);
    }
View Full Code Here

        mockConfiguration = mockery.mock(IsisConfiguration.class);
        mockRandomCodeGenerator = mockery.mock(RandomCodeGenerator.class);
        mockAuthenticator = mockery.mock(Authenticator.class);
        mockAuthSession = mockery.mock(AuthenticationSession.class);

        authenticationManager = new AuthenticationManagerStandard(mockConfiguration);
        authenticationManager.addAuthenticator(mockAuthenticator);
        authenticationManager.setRandomCodeGenerator(mockRandomCodeGenerator);

        mockery.checking(new Expectations() {
            {
View Full Code Here

     * all requests.
     */
    private AuthenticationManager anonymousAuthenticationManager() {
        if (authenticationManager == null) {
            final IsisConfiguration configuration = IsisContext.getConfiguration();
            final AuthenticationManagerStandard authenticationManager = new AuthenticationManagerStandard(configuration);
            authenticationManager.addAuthenticator(new AuthenticatorAbstract(configuration) {
                @Override
                public boolean isValid(final AuthenticationRequest request) {
                    return true;
                }

                @Override
                public boolean canAuthenticate(final Class<? extends AuthenticationRequest> authenticationRequestClass) {
                    return true;
                }
            });
            authenticationManager.init();
            this.authenticationManager = authenticationManager;
        }
        return authenticationManager;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.runtime.authentication.standard.AuthenticationManagerStandard

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.