Java Code Examples for org.pac4j.jwt.credentials.authenticator.JwtAuthenticator

The following examples show how to use org.pac4j.jwt.credentials.authenticator.JwtAuthenticator. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: NNAnalytics   Source File: SecurityContext.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Initializes the authentication and authorization of NNA.
 *
 * @param appConf the security configuration
 * @param jwtAuth the JWT authentication object
 * @param jwtGen the JWT generator object
 * @param ldapAuthenticator ldap authenticator
 */
public void init(
    ApplicationConfiguration appConf,
    JwtAuthenticator jwtAuth,
    JwtGenerator<CommonProfile> jwtGen,
    LdapAuthenticator ldapAuthenticator) {
  this.applicationConfiguration = appConf;
  this.jwtAuthenticator = jwtAuth;
  this.jwtGenerator = jwtGen;
  this.ldapAuthenticator = ldapAuthenticator;

  this.adminUsers = new UserSet(appConf.getAdminUsers());
  this.writeUsers = new UserSet(appConf.getWriteUsers());
  this.readOnlyUsers = new UserSet(appConf.getReadOnlyUsers());
  this.cacheReaderUsers = new UserSet(appConf.getCacheReaderUsers());
  this.localOnlyUsers = new UserPasswordSet(appConf.getLocalOnlyUsers());

  this.init = true;
}