Yoga.HTTP.API.Route.Auth
- Package
- purescript-yoga-http-api
- Repository
- rowtype-yoga/purescript-yoga-http-api
#BearerToken Source
newtype BearerTokenBearer token newtype that validates the "Bearer " prefix
Example: parseHeader "Bearer abc123" :: Either String BearerToken = Right (BearerToken "abc123") parseHeader "abc123" :: Either String BearerToken = Left "missing 'Bearer ' prefix"
Constructors
Instances
#BasicAuth Source
newtype BasicAuthBasic authentication header value (Base64-encoded credentials)
Example: parseHeader "Basic dXNlcjpwYXNz" :: Either String BasicAuth = Right (BasicAuth "dXNlcjpwYXNz")
The raw Base64-encoded credentials are preserved for server-side verification
Constructors
Instances
#ApiKeyHeader Source
newtype ApiKeyHeaderAPI Key passed in a custom header
Example: parseHeader "abc123" :: Either String ApiKeyHeader = Right (ApiKeyHeader "abc123")
Constructors
Instances
#ApiKeyCookie Source
newtype ApiKeyCookieAPI Key passed in a cookie (for authentication purposes) This is a marker type that indicates the cookie should be treated as an authentication mechanism in OpenAPI (securitySchemes) rather than a regular cookie parameter.
Example: Request { cookies :: { sessionId :: ApiKeyCookie } }
Constructors
Instances
#DigestAuth Source
newtype DigestAuthDigest authentication header value
Example: parseHeader "Digest username="user", realm="api", ..." :: Either String DigestAuth = Right (DigestAuth "Digest username="user", realm="api", ...")
Constructors
Instances
- Modules
- Yoga.
HTTP. API. Path - Yoga.
HTTP. API. Route - Yoga.
HTTP. API. Route. Auth - Yoga.
HTTP. API. Route. BearerToken - Yoga.
HTTP. API. Route. Encoding - Yoga.
HTTP. API. Route. Handler - Yoga.
HTTP. API. Route. HeaderError - Yoga.
HTTP. API. Route. HeaderValue - Yoga.
HTTP. API. Route. Method - Yoga.
HTTP. API. Route. OpenAPI - Yoga.
HTTP. API. Route. OpenAPIMetadata - Yoga.
HTTP. API. Route. RenderMethod - Yoga.
HTTP. API. Route. Response - Yoga.
HTTP. API. Route. Route - Yoga.
HTTP. API. Route. RouteHandler - Yoga.
HTTP. API. Route. StatusCode