zio.http.endpoint.AuthType
See theAuthType companion object
Describes the authentication type for an Endpoint.
When authentication fails at runtime, the endpoint responds with unauthorizedStatus, which defaults to Status.NotFound (404). This is an intentional security pattern (information hiding) that prevents attackers from discovering protected resources. To use a different status:
Endpoint(Method.GET / "secret")
.auth(AuthType.Bearer)
.unauthorizedStatus(Status.Unauthorized) // respond with 401 instead
Attributes
- Companion
- object
- Source
- AuthType.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object Basicobject Bearerclass Custom[ClientReq]object Digestobject Noneclass ScopedAuth[ClientReq]class WithStatus[ClientReq]
- Self type
Members list
In this article