Search in sources :

Example 1 with ScriptEvaluator

use of org.forgerock.openam.scripting.ScriptEvaluator in project OpenAM by OpenRock.

the class OpenAMScopeValidatorTest method setup.

@BeforeMethod
public void setup() throws Exception {
    client = mock(ClientRegistration.class);
    request = mock(OAuth2Request.class);
    providerSettings = mock(OAuth2ProviderSettings.class);
    clientRegistrationStore = mock(OpenIdConnectClientRegistrationStore.class);
    OAuth2ProviderSettingsFactory factory = mock(OAuth2ProviderSettingsFactory.class);
    when(factory.get(request)).thenReturn(providerSettings);
    ScriptEvaluator scriptEvaluator = mock(ScriptEvaluator.class);
    IdentityManager identityManager = mock(IdentityManager.class);
    identity = mock(AMIdentity.class);
    when(identityManager.getResourceOwnerIdentity(anyString(), anyString())).thenReturn(identity);
    validator = new OpenAMScopeValidator(identityManager, null, factory, null, scriptEvaluator, clientRegistrationStore, null);
}
Also used : OAuth2Request(org.forgerock.oauth2.core.OAuth2Request) ScriptEvaluator(org.forgerock.openam.scripting.ScriptEvaluator) ClientRegistration(org.forgerock.oauth2.core.ClientRegistration) OAuth2ProviderSettingsFactory(org.forgerock.oauth2.core.OAuth2ProviderSettingsFactory) AMIdentity(com.sun.identity.idm.AMIdentity) OAuth2ProviderSettings(org.forgerock.oauth2.core.OAuth2ProviderSettings) OpenIdConnectClientRegistrationStore(org.forgerock.openidconnect.OpenIdConnectClientRegistrationStore) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

AMIdentity (com.sun.identity.idm.AMIdentity)1 ClientRegistration (org.forgerock.oauth2.core.ClientRegistration)1 OAuth2ProviderSettings (org.forgerock.oauth2.core.OAuth2ProviderSettings)1 OAuth2ProviderSettingsFactory (org.forgerock.oauth2.core.OAuth2ProviderSettingsFactory)1 OAuth2Request (org.forgerock.oauth2.core.OAuth2Request)1 ScriptEvaluator (org.forgerock.openam.scripting.ScriptEvaluator)1 OpenIdConnectClientRegistrationStore (org.forgerock.openidconnect.OpenIdConnectClientRegistrationStore)1 BeforeMethod (org.testng.annotations.BeforeMethod)1