Search in sources :

Example 1 with SecurityScope

use of org.glassfish.security.services.common.SecurityScope in project Payara by payara.

the class AuthenticationServiceFactory method provide.

@SecurityScope
public AuthenticationService provide() {
    String currentState = manager.getCurrent();
    // Get Service Instance
    AuthenticationService atnService = AccessController.doPrivileged(new PrivilegedLookup<AuthenticationService>(serviceLocator, AuthenticationService.class));
    // Get Service Configuration
    org.glassfish.security.services.config.AuthenticationService atnConfiguration = serviceLocator.getService(org.glassfish.security.services.config.AuthenticationService.class, currentState);
    // Initialize Service
    atnService.initialize(atnConfiguration);
    return atnService;
}
Also used : AuthenticationService(org.glassfish.security.services.api.authentication.AuthenticationService) SecurityScope(org.glassfish.security.services.common.SecurityScope)

Aggregations

AuthenticationService (org.glassfish.security.services.api.authentication.AuthenticationService)1 SecurityScope (org.glassfish.security.services.common.SecurityScope)1