AuthConfig class sealed
- Available extensions
- Annotations
-
- @freezed
Constructors
- AuthConfig.basic({required String username, required String password})
-
HTTP Basic authentication.
constfactory
- AuthConfig.bearer({required String token})
-
Bearer token authentication.
constfactory
- AuthConfig.header({required String name, required String value})
-
Custom authentication header.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> ({required TResult basic(AuthConfig_Basic value), required TResult bearer(AuthConfig_Bearer value), required TResult header(AuthConfig_Header value)}) → TResult -
Available on AuthConfig, provided by the AuthConfigPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? basic(AuthConfig_Basic value)?, TResult? bearer(AuthConfig_Bearer value)?, TResult? header(AuthConfig_Header value)?}) → TResult? -
Available on AuthConfig, provided by the AuthConfigPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({TResult basic(AuthConfig_Basic value)?, TResult bearer(AuthConfig_Bearer value)?, TResult header(AuthConfig_Header value)?, required TResult orElse()}) → TResult -
Available on AuthConfig, provided by the AuthConfigPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> ({TResult basic(String username, String password)?, TResult bearer(String token)?, TResult header(String username, String password)?, required TResult orElse()}) → TResult -
Available on AuthConfig, provided by the AuthConfigPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> ({required TResult basic(String username, String password), required TResult bearer(String token), required TResult header(String username, String password)}) → TResult -
Available on AuthConfig, provided by the AuthConfigPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> ({TResult? basic(String username, String password)?, TResult? bearer(String token)?, TResult? header(String username, String password)?}) → TResult? -
Available on AuthConfig, provided by the AuthConfigPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited