TokenConfig class
Token configuration entity
Constructors
- TokenConfig({required TokenType type, String? headerName, String? queryParam, String? prefix})
-
const
- TokenConfig.bearer()
-
Bearer token configuration (Authorization: Bearer {token})
const
- TokenConfig.customHeader(String headerName, {String? prefix})
-
Custom header configuration
const
- TokenConfig.queryParameter(String queryParam)
-
Query parameter configuration
const
- TokenConfig.token()
-
Token configuration (Authorization: Token {token})
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerName → String?
-
final
- prefix → String?
-
final
- queryParam → String?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → TokenType
-
final
Methods
-
applyToHeaders(
String token, Map< String, String> headers) → Map<String, String> - Apply token to headers or query parameters
-
applyToQuery(
String token, Map< String, dynamic> ? queryParams) → Map<String, dynamic> - Apply token to query parameters
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited