Package com.porterhead.rest.authorization.impl

Examples of com.porterhead.rest.authorization.impl.SessionTokenAuthorizationService


     */
    private void delegateAuthorizationService(UserRepository userRepository, UserService userService, ApplicationConfig config) {
        if(config.requireSignedRequests()) {
            this.authorizationService = new RequestSigningAuthorizationService(userRepository, userService, config);
        } else {
            this.authorizationService = new SessionTokenAuthorizationService(userRepository);
        }
    }
View Full Code Here



    @Before
    public void setUp() {
        super.setUp();
        authorizationService = new SessionTokenAuthorizationService(userRepository);
    }
View Full Code Here

         userRepository = mock(UserRepository.class);
         when(userRepository.findByUuid(eq(USER.getUuid().toString()))).thenReturn(USER);
         when(userRepository.findBySession(eq(AUTH_TOKEN))).thenReturn(USER);
         applicationConfig = mock(ApplicationConfig.class);
         when(applicationConfig.getSessionDateOffsetInMinutes()).thenReturn(30);
         authorizationService = new SessionTokenAuthorizationService(userRepository);
    }
View Full Code Here

TOP

Related Classes of com.porterhead.rest.authorization.impl.SessionTokenAuthorizationService

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.