AuthenticationServiceFactory
works.iterative.server.http.AuthenticationServiceFactory
object AuthenticationServiceFactory
Factory that creates the appropriate AuthenticationService based on configuration.
Reads auth_provider and env from ZIO Config to determine which authentication implementation to use:
- "test": TestAuthenticationService (for testing only, forbidden in production)
- "oidc": Pac4jAuthenticationAdapter (for production OIDC authentication)
Example usage:
val app = ZIO.serviceWithZIO[AuthenticationService](_.currentUser)
.provide(AuthenticationServiceFactory.layer)
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Members list
In this article