adk_bearer_auth (erlang_adk v0.7.0)

View Source

Strict extraction of OAuth bearer credentials from HTTP headers.

This module intentionally has no query-string API. Access tokens are accepted only from a single Authorization header and are never included in an error value.

Summary

Types

error_reason/0

-type error_reason() ::
          missing_bearer_token | multiple_authorization_headers | malformed_authorization_header |
          unsupported_authorization_scheme.

Functions

extract(Headers)

-spec extract(map() | [{term(), term()}]) -> {ok, binary()} | {error, error_reason()}.