use of org.forgerock.openam.core.CoreWrapper in project OpenAM by OpenRock.
the class SessionConditionTest method setUp.
@BeforeMethod
public void setUp() {
Debug debug = mock(Debug.class);
coreWrapper = mock(CoreWrapper.class);
timeService = mock(TimeService.class);
condition = new SessionCondition(debug, coreWrapper, timeService);
}
use of org.forgerock.openam.core.CoreWrapper in project OpenAM by OpenRock.
the class AuthenticateToServiceConditionTest method setUp.
@BeforeMethod
public void setUp() {
Debug debug = mock(Debug.class);
coreWrapper = mock(CoreWrapper.class);
entitlementCoreWrapper = mock(EntitlementCoreWrapper.class);
condition = new AuthenticateToServiceCondition(debug, coreWrapper, entitlementCoreWrapper);
}
use of org.forgerock.openam.core.CoreWrapper in project OpenAM by OpenRock.
the class OAuth2AuditOAuth2TokenContextProvider method getUserIdFromUsernameAndRealm.
protected String getUserIdFromUsernameAndRealm(String username, String realm) {
if (username == null || realm == null) {
return null;
}
CoreWrapper cw = new CoreWrapper();
AMIdentity identity = cw.getIdentity(username, realm);
if (identity != null) {
return identity.getUniversalId();
}
return null;
}
use of org.forgerock.openam.core.CoreWrapper in project OpenAM by OpenRock.
the class ResourceSetServiceTest method setup.
@BeforeMethod
public void setup() throws Exception {
ResourceSetStoreFactory resourceSetStoreFactory = mock(ResourceSetStoreFactory.class);
resourceSetStore = mock(ResourceSetStore.class);
policyService = mock(UmaPolicyService.class);
coreWrapper = mock(CoreWrapper.class);
UmaProviderSettingsFactory umaProviderSettingsFactory = mock(UmaProviderSettingsFactory.class);
umaProviderSettings = mock(UmaProviderSettings.class);
service = new ResourceSetService(resourceSetStoreFactory, policyService, coreWrapper, umaProviderSettingsFactory);
given(resourceSetStoreFactory.create("REALM")).willReturn(resourceSetStore);
given(umaProviderSettingsFactory.get("REALM")).willReturn(umaProviderSettings);
}
Aggregations