WwwAuthenticateChallenge class
A parsed WWW-Authenticate: Bearer … challenge (RFC 6750 / RFC 9728).
Only the Bearer scheme is interpreted. Recognized auth-params:
resource_metadata (RFC 9728 / SEP-985 — the PRM document URL),
scope (SEP-835 incremental scope step-up), error, error_description,
and realm. Unknown params are preserved in params.
- Annotations
-
- @immutable
Constructors
-
WwwAuthenticateChallenge({required String scheme, required Map<
String, String> params}) -
const
Properties
- error → String?
-
OAuth
errorcode (e.g.invalid_token), or null.no setter - errorDescription → String?
-
Human-readable
error_description, or null.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isBearer → bool
-
Whether this is a
Bearerchallenge.no setter -
params
→ Map<
String, String> -
All auth-params as parsed (keys lower-cased, quotes stripped).
final
- resourceMetadata → String?
-
RFC 9728 / SEP-985: URL of the OAuth Protected Resource Metadata
document (
resource_metadata), or null when absent.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scheme → String
-
The challenge scheme (e.g.
Bearer). Lower-cased for comparison.final - scope → String?
-
SEP-835: space-delimited required scope advertised for step-up, or null.
no setter
-
scopes
→ List<
String> -
Parsed scope list (empty when scope is absent).
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
parse(
String? header) → WwwAuthenticateChallenge? -
Parse a raw
WWW-Authenticateheader value.