@Test public void shouldResolveAuthorizationRequest_noRequestedScope_userDefaultScopes() { final String scope = "read"; TokenRequest authorizationRequest = new TokenRequest(); Client client = new Client(); client.setEnhanceScopesWithUserPermissions(true); User user = new User(); Role role = new Role(); role.setOauthScopes(Collections.singletonList(scope)); user.setRolesPermissions(Collections.singleton(role)); TestObserver<TokenRequest> testObserver = tokenRequestResolver.resolve(authorizationRequest, client, user).test(); testObserver.assertComplete(); testObserver.assertNoErrors(); testObserver.assertValue(request -> request.getScopes().iterator().next().equals(scope)); }
public Single<TokenRequest> resolve(TokenRequest tokenRequest, Client client, User endUser) { return resolveAuthorizedScopes(tokenRequest, client, endUser); }
TokenRequestResolver extends AbstractRequestResolver<TokenRequest> { public Single<TokenRequest> resolve(TokenRequest tokenRequest, Client client, User endUser) { return resolveAuthorizedScopes(tokenRequest, client, endUser); } }
TokenRequestResolver extends AbstractRequestResolver<TokenRequest> { public Single<TokenRequest> resolve(TokenRequest tokenRequest, Client client, User endUser) { return resolveAuthorizedScopes(tokenRequest, client, endUser); }  }
TokenRequestResolver extends AbstractRequestResolver<TokenRequest> { public Single<TokenRequest> resolve(TokenRequest tokenRequest, Client client, User endUser) { return resolveAuthorizedScopes(tokenRequest, client, endUser); }  Single<TokenRequest> resolve(TokenRequest tokenRequest, Client client, User endUser); }
TokenRequestResolver extends AbstractRequestResolver<TokenRequest> { public Single<TokenRequest> resolve(TokenRequest tokenRequest, Client client, User endUser) { return resolveAuthorizedScopes(tokenRequest, client, endUser); }  Single<TokenRequest> resolve(TokenRequest tokenRequest, Client client, User endUser);  }