Class AuthProviderParameters

java.lang.Object
com.linecorp.centraldogma.server.auth.AuthProviderParameters

public final class AuthProviderParameters extends Object
Parameters which are used to create a new AuthProvider instance.
  • Constructor Details

    • AuthProviderParameters

      public AuthProviderParameters(Authorizer<HttpRequest> authorizer, CentralDogmaConfig config, Supplier<String> sessionIdGenerator, Function<Session,CompletableFuture<Void>> loginSessionPropagator, Function<String,CompletableFuture<Void>> logoutSessionPropagator)
      Creates a new instance.
      Parameters:
      authorizer - the Authorizer which is used to authenticate a session token
      config - the configuration for the Central Dogma server
      sessionIdGenerator - the session ID generator which must be used when generating a new session ID
      loginSessionPropagator - the function which propagates the Session to the other replicas
      logoutSessionPropagator - a function which propagates the logged out session ID to the other replicas
  • Method Details

    • authorizer

      public Authorizer<HttpRequest> authorizer()
      Returns an Authorizer which is used to authenticate a session token.
    • config

      public CentralDogmaConfig config()
      Returns the configuration for the Central Dogma server.
    • authConfig

      public AuthConfig authConfig()
      Returns the authentication configuration.
    • sessionIdGenerator

      public Supplier<String> sessionIdGenerator()
      Returns the session ID generator which must be used when generating a new session ID. The default session manager relies on the session ID format, so if the AuthProvider does not use this generator the session might be rejected from the session manager.
    • loginSessionPropagator

      public Function<Session,CompletableFuture<Void>> loginSessionPropagator()
      Returns a function which propagates the Session to the other replicas. It would be invoked after a login process is successfully completed.
    • logoutSessionPropagator

      public Function<String,CompletableFuture<Void>> logoutSessionPropagator()
      Returns a function which propagates the logged out session ID to the other replicas. It would be invoked after a logout process is successfully completed.