@Test public void constructorWhenAccessTokenResponseClientIsNullThenThrowIllegalArgumentException() { this.exception.expect(IllegalArgumentException.class); new OAuth2LoginAuthenticationProvider(null, this.userService); }
@Test public void constructorWhenUserServiceIsNullThenThrowIllegalArgumentException() { this.exception.expect(IllegalArgumentException.class); new OAuth2LoginAuthenticationProvider(this.accessTokenResponseClient, null); }
@Before @SuppressWarnings("unchecked") public void setUp() throws Exception { this.clientRegistration = clientRegistration().build(); this.authorizationRequest = request().scope("scope1", "scope2").build(); this.authorizationResponse = success().build(); this.authorizationExchange = new OAuth2AuthorizationExchange(this.authorizationRequest, this.authorizationResponse); this.accessTokenResponseClient = mock(OAuth2AccessTokenResponseClient.class); this.userService = mock(OAuth2UserService.class); this.authenticationProvider = new OAuth2LoginAuthenticationProvider(this.accessTokenResponseClient, this.userService); }
new OAuth2LoginAuthenticationProvider(accessTokenResponseClient, oauth2UserService); GrantedAuthoritiesMapper userAuthoritiesMapper = this.getGrantedAuthoritiesMapper(); if (userAuthoritiesMapper != null) {
new OAuth2LoginAuthenticationProvider(accessTokenResponseClient, oauth2UserService); GrantedAuthoritiesMapper userAuthoritiesMapper = this.getGrantedAuthoritiesMapper(); if (userAuthoritiesMapper != null) {
new OAuth2LoginAuthenticationProvider(accessTokenResponseClient, oauth2UserService); GrantedAuthoritiesMapper userAuthoritiesMapper = this.getGrantedAuthoritiesMapper(); if (userAuthoritiesMapper != null) {