menu
sdk_core_dart package
documentation
auth.dart
auth.dart
dark_mode
light_mode
auth
library
Classes
AuthConfig
Tuning knobs for
authInterceptor
.
FunctionTokenSource
Adapts a function into a
TokenSource
. The function is invoked once per request that needs a token. Callers responsible for caching and refresh implement that logic inside the closure.
StaticTokenSource
Returns the same token for every call. Use for API keys, manually-issued long-lived JWTs, and tests.
TokenSource
Source of credentials for the auth interceptor. Called once per request that does not already carry an Authorization header.
Constants
authorizationHeader
→ const
String
Conventional header for Bearer / API-key credentials.
bearerPrefix
→ const
String
Conventional Bearer prefix per RFC 6750.
Functions
authInterceptor
(
AuthConfig
config
)
→ Interceptor
Builds an
Interceptor
that fetches a credential from
AuthConfig.source
and writes it into
AuthConfig.headerName
before delegating to
next
.
sdk_core_dart package
documentation
auth.dart
sdk_core_dart
package
Libraries
auth
errors
idempotency
retry
timeout
auth library