public static void configure ( TokenBasedAuthConfiguration configuration ) { encryptor . setPoolSize ( configuration . getPoolSize ( ) ) ; // This would be a good value for a 4-core system if ( configuration . getServerPassword ( ) . equals ( "auto" ) ) { encryptor . setPassword ( UUID . randomUUID ( ) . toString ( ) ) ; } else { encryptor . setPassword ( configuration . getServerPassword ( ) ) ; } encryptor . setAlgorithm ( configuration . getAlgorithm ( ) ) ; encryptor . initialize ( ) ; BasicToken . defaultMaxAge = configuration . getMaxage ( ) ; //Create cache for permissions. cache = CacheBuilder . newBuilder ( ) . expireAfterAccess ( defaultMaxAge , TimeUnit . SECONDS ) . expireAfterWrite ( defaultMaxAge , TimeUnit . SECONDS ) . build ( ) ; }
Configure method for Token generation configurations and encryptor configure