/** Lazily creates an {@link AuthenticationManager} that will authenticate all requests. */
  private AuthenticationManager anonymousAuthenticationManager() {
    if (authenticationManager == null) {
      final IsisConfiguration configuration = IsisContext.getConfiguration();
      final AuthenticationManagerStandard authenticationManager =
          new AuthenticationManagerStandard(configuration);
      authenticationManager.addAuthenticator(
          new AuthenticatorAbstract(configuration) {
            @Override
            public boolean isValid(final AuthenticationRequest request) {
              return true;
            }

            @Override
            public boolean canAuthenticate(
                final Class<? extends AuthenticationRequest> authenticationRequestClass) {
              return true;
            }
          });
      authenticationManager.init();
      this.authenticationManager = authenticationManager;
    }
    return authenticationManager;
  }
Ejemplo n.º 2
0
 protected IsisConfiguration getConfiguration() {
   return IsisContext.getConfiguration();
 }
Ejemplo n.º 3
0
 public IsisConfiguration getConfiguration() {
   return IsisContext.getConfiguration();
 }