use of org.forgerock.oauth2.core.AuthorizationService in project OpenAM by OpenRock.
the class AuthorizationServiceImplTest method setUp.
@BeforeMethod
public void setUp() throws Exception {
requestValidator = mock(AuthorizeRequestValidator.class);
List<AuthorizeRequestValidator> requestValidators = new ArrayList<AuthorizeRequestValidator>();
requestValidators.add(requestValidator);
resourceOwnerSessionValidator = mock(ResourceOwnerSessionValidator.class);
OAuth2ProviderSettingsFactory providerSettingsFactory = mock(OAuth2ProviderSettingsFactory.class);
resourceOwnerConsentVerifier = mock(ResourceOwnerConsentVerifier.class);
clientRegistrationStore = mock(ClientRegistrationStore.class);
tokenIssuer = mock(AuthorizationTokenIssuer.class);
ClientAuthenticationFailureFactory failureFactory = mock(ClientAuthenticationFailureFactory.class);
authorizationService = new AuthorizationServiceImpl(requestValidators, resourceOwnerSessionValidator, providerSettingsFactory, resourceOwnerConsentVerifier, clientRegistrationStore, tokenIssuer, failureFactory);
providerSettings = mock(OAuth2ProviderSettings.class);
given(providerSettingsFactory.get(Matchers.<OAuth2Request>anyObject())).willReturn(providerSettings);
}
Aggregations