Search in sources :

Example 1 with AuditEventPublisher

use of org.forgerock.openam.audit.AuditEventPublisher in project OpenAM by OpenRock.

the class RestRouterIT method setupMocks.

@BeforeMethod
public void setupMocks() {
    MockitoAnnotations.initMocks(this);
    configResource = mock(SingletonResourceProvider.class);
    usersResource = mock(CollectionResourceProvider.class);
    internalResource = mock(CollectionResourceProvider.class);
    dashboardResource = spy(new DashboardResource());
    authenticateResource = spy(new AuthenticateResource());
    httpAccessAuditFilter = spy(new AbstractHttpAccessAuditFilter(AUTHENTICATION, mock(AuditEventPublisher.class), mock(AuditEventFactory.class)) {

        @Override
        protected String getRealm(Context context) {
            return null;
        }
    });
    auditEventPublisher = mock(AuditEventPublisher.class);
    auditServiceProvider = mock(AuditServiceProvider.class);
    versionBehaviourManager = mock(ResourceApiVersionBehaviourManager.class);
    ssoTokenManager = mock(SSOTokenManager.class);
    authUtilsWrapper = mock(AuthUtilsWrapper.class);
    coreWrapper = mock(CoreWrapper.class);
    SSOToken adminToken = mock(SSOToken.class);
    given(coreWrapper.getAdminToken()).willReturn(adminToken);
    given(coreWrapper.isValidFQDN(anyString())).willReturn(true);
    realmValidator = mock(RestRealmValidator.class);
}
Also used : RootContext(org.forgerock.services.context.RootContext) RequestAuditContext(org.forgerock.services.context.RequestAuditContext) HttpContext(org.forgerock.json.resource.http.HttpContext) SessionContext(org.forgerock.http.session.SessionContext) SSOTokenContext(org.forgerock.openam.rest.resource.SSOTokenContext) AttributesContext(org.forgerock.services.context.AttributesContext) SecurityContext(org.forgerock.services.context.SecurityContext) Context(org.forgerock.services.context.Context) SSOTokenManager(com.iplanet.sso.SSOTokenManager) CoreWrapper(org.forgerock.openam.core.CoreWrapper) AuditServiceProvider(org.forgerock.openam.audit.AuditServiceProvider) SSOToken(com.iplanet.sso.SSOToken) SingletonResourceProvider(org.forgerock.json.resource.SingletonResourceProvider) AuditEventPublisher(org.forgerock.openam.audit.AuditEventPublisher) CollectionResourceProvider(org.forgerock.json.resource.CollectionResourceProvider) AuthUtilsWrapper(org.forgerock.openam.authentication.service.AuthUtilsWrapper) AuditEventFactory(org.forgerock.openam.audit.AuditEventFactory) ResourceApiVersionBehaviourManager(org.forgerock.http.routing.ResourceApiVersionBehaviourManager) RestRealmValidator(org.forgerock.openam.rest.router.RestRealmValidator) AbstractHttpAccessAuditFilter(org.forgerock.openam.audit.AbstractHttpAccessAuditFilter) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

SSOToken (com.iplanet.sso.SSOToken)1 SSOTokenManager (com.iplanet.sso.SSOTokenManager)1 ResourceApiVersionBehaviourManager (org.forgerock.http.routing.ResourceApiVersionBehaviourManager)1 SessionContext (org.forgerock.http.session.SessionContext)1 CollectionResourceProvider (org.forgerock.json.resource.CollectionResourceProvider)1 SingletonResourceProvider (org.forgerock.json.resource.SingletonResourceProvider)1 HttpContext (org.forgerock.json.resource.http.HttpContext)1 AbstractHttpAccessAuditFilter (org.forgerock.openam.audit.AbstractHttpAccessAuditFilter)1 AuditEventFactory (org.forgerock.openam.audit.AuditEventFactory)1 AuditEventPublisher (org.forgerock.openam.audit.AuditEventPublisher)1 AuditServiceProvider (org.forgerock.openam.audit.AuditServiceProvider)1 AuthUtilsWrapper (org.forgerock.openam.authentication.service.AuthUtilsWrapper)1 CoreWrapper (org.forgerock.openam.core.CoreWrapper)1 SSOTokenContext (org.forgerock.openam.rest.resource.SSOTokenContext)1 RestRealmValidator (org.forgerock.openam.rest.router.RestRealmValidator)1 AttributesContext (org.forgerock.services.context.AttributesContext)1 Context (org.forgerock.services.context.Context)1 RequestAuditContext (org.forgerock.services.context.RequestAuditContext)1 RootContext (org.forgerock.services.context.RootContext)1 SecurityContext (org.forgerock.services.context.SecurityContext)1