NanoOAuthCallback class final
Parsed response from an OAuth 2.0 authorization redirect or deep link.
Constructors
-
NanoOAuthCallback({String? code, String? state, String? error, String? errorDescription, Map<
String, String> rawParameters = const {}}) -
Creates a NanoOAuthCallback model.
const
- NanoOAuthCallback.fromUri(Uri uri)
-
Parses an OAuth callback from a redirect Uri.
factory
- NanoOAuthCallback.fromUrl(String url)
-
Parses an OAuth callback from a redirect URL string.
factory
Properties
- code → String?
-
The authorization code returned on successful authentication.
final
- error → String?
-
The OAuth error identifier returned when authorization is denied or fails.
final
- errorDescription → String?
-
Optional human-readable description of the authorization error.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSuccess → bool
-
Whether the callback represents a successful authorization response.
no setter
-
rawParameters
→ Map<
String, String> -
The complete raw map of query parameters parsed from the callback URI.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → String?
-
The anti-CSRF state token returned in the callback query.
final
Methods
-
isValidState(
String? expectedState) → bool - Validates whether the returned state matches the expected original state.
-
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