Search in sources :

Example 1 with TokenIdGenerator

use of org.forgerock.openam.cts.api.tokens.TokenIdGenerator in project OpenAM by OpenRock.

the class OpenAMResourceSetStoreTest method setup.

@BeforeMethod
@SuppressWarnings("unchecked")
public void setup() throws Exception {
    dataStore = mock(TokenDataStore.class);
    OAuth2ProviderSettingsFactory providerSettingsFactory = mock(OAuth2ProviderSettingsFactory.class);
    OAuth2UrisFactory<RealmInfo> oAuth2UrisFactory = mock(OAuth2UrisFactory.class);
    OAuth2Uris oAuth2Uris = mock(OAuth2Uris.class);
    TokenIdGenerator idGenerator = mock(TokenIdGenerator.class);
    store = new OpenAMResourceSetStore("REALM", providerSettingsFactory, oAuth2UrisFactory, idGenerator, dataStore);
    given(oAuth2UrisFactory.get(Matchers.<OAuth2Request>anyObject())).willReturn(oAuth2Uris);
    given(oAuth2Uris.getResourceSetRegistrationPolicyEndpoint(anyString())).willReturn("POLICY_URI");
}
Also used : TokenDataStore(org.forgerock.openam.sm.datalayer.store.TokenDataStore) RealmInfo(org.forgerock.openam.core.RealmInfo) TokenIdGenerator(org.forgerock.openam.cts.api.tokens.TokenIdGenerator) OAuth2ProviderSettingsFactory(org.forgerock.oauth2.core.OAuth2ProviderSettingsFactory) OAuth2Uris(org.forgerock.oauth2.core.OAuth2Uris) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

OAuth2ProviderSettingsFactory (org.forgerock.oauth2.core.OAuth2ProviderSettingsFactory)1 OAuth2Uris (org.forgerock.oauth2.core.OAuth2Uris)1 RealmInfo (org.forgerock.openam.core.RealmInfo)1 TokenIdGenerator (org.forgerock.openam.cts.api.tokens.TokenIdGenerator)1 TokenDataStore (org.forgerock.openam.sm.datalayer.store.TokenDataStore)1 BeforeMethod (org.testng.annotations.BeforeMethod)1