Search in sources :

Example 1 with FF4JSecurityContextAuthenticationManager

use of org.ff4j.web.api.security.FF4JSecurityContextAuthenticationManager in project ff4j by ff4j.

the class SecuredFF4JResourceTestIT method setUp.

/**
 * {@inheritDoc}
 */
@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    // Bridge security between ff4j and jersey
    ff4j.setAuthorizationsManager(new FF4JSecurityContextAuthenticationManager());
    if (assertFF4J == null) {
        assertFF4J = new AssertFf4j(ff4j);
    }
}
Also used : AssertFf4j(org.ff4j.test.AssertFf4j) FF4JSecurityContextAuthenticationManager(org.ff4j.web.api.security.FF4JSecurityContextAuthenticationManager) Before(org.junit.Before)

Example 2 with FF4JSecurityContextAuthenticationManager

use of org.ff4j.web.api.security.FF4JSecurityContextAuthenticationManager in project ff4j by ff4j.

the class SecurityAuthenticationFilterTest method testAuthenticationManager.

@Test
public void testAuthenticationManager() {
    FF4JSecurityContextAuthenticationManager mnger = new FF4JSecurityContextAuthenticationManager();
    mnger.listAllPermissions();
    mnger.getCurrentUserPermissions();
}
Also used : FF4JSecurityContextAuthenticationManager(org.ff4j.web.api.security.FF4JSecurityContextAuthenticationManager) Test(org.junit.Test)

Aggregations

FF4JSecurityContextAuthenticationManager (org.ff4j.web.api.security.FF4JSecurityContextAuthenticationManager)2 AssertFf4j (org.ff4j.test.AssertFf4j)1 Before (org.junit.Before)1 Test (org.junit.Test)1