@Test public void shouldNotResolveAuthorizationRequest_unknownScope() { final String scope = "read"; final String redirectUri = "http: AuthorizationRequest authorizationRequest = new AuthorizationRequest(); authorizationRequest.setScopes(Collections.singleton(scope)); authorizationRequest.setRedirectUri(redirectUri); Client client = new Client(); TestObserver<AuthorizationRequest> testObserver = authorizationRequestResolver.resolve(authorizationRequest, client, null).test(); testObserver.assertNotComplete(); testObserver.assertError(InvalidScopeException.class); }
public Single<AuthorizationRequest> resolve(AuthorizationRequest authorizationRequest, Client client, User endUser) { return resolveAuthorizedScopes(authorizationRequest, client, endUser) .flatMap(request -> resolveRedirectUri(request, client)); }
AuthorizationRequestResolver extends AbstractRequestResolver<AuthorizationRequest> { public Single<AuthorizationRequest> resolve(AuthorizationRequest authorizationRequest, Client client, User endUser) { return resolveAuthorizedScopes(authorizationRequest, client, endUser) .flatMap(request -> resolveRedirectUri(request, client)); } }
AuthorizationRequestResolver extends AbstractRequestResolver<AuthorizationRequest> { public Single<AuthorizationRequest> resolve(AuthorizationRequest authorizationRequest, Client client, User endUser) { return resolveAuthorizedScopes(authorizationRequest, client, endUser) .flatMap(request -> resolveRedirectUri(request, client)); }  }
AuthorizationRequestResolver extends AbstractRequestResolver<AuthorizationRequest> { public Single<AuthorizationRequest> resolve(AuthorizationRequest authorizationRequest, Client client, User endUser) { return resolveAuthorizedScopes(authorizationRequest, client, endUser) .flatMap(request -> resolveRedirectUri(request, client)); }  Single<AuthorizationRequest> resolve(AuthorizationRequest authorizationRequest, Client client, User endUser); Single<AuthorizationRequest> resolveRedirectUri(AuthorizationRequest authorizationRequest, Client client); }
AuthorizationRequestResolver extends AbstractRequestResolver<AuthorizationRequest> { public Single<AuthorizationRequest> resolve(AuthorizationRequest authorizationRequest, Client client, User endUser) { return resolveAuthorizedScopes(authorizationRequest, client, endUser) .flatMap(request -> resolveRedirectUri(request, client)); }  Single<AuthorizationRequest> resolve(AuthorizationRequest authorizationRequest, Client client, User endUser); Single<AuthorizationRequest> resolveRedirectUri(AuthorizationRequest authorizationRequest, Client client);  }