OpenId class
OpenId Interceptor for Dio
configuration is the OpenId configuration dio is the Dio instance to use
Example:
OpenId(
configuration: OpenIdConfiguration(
clientId: "example-id",
clientSecret: "example-clientSecret",
uri: Uri.parse("http://localhost:8080/realm/master"),
scopes: ["openid", "profile"],
),
);
OpenId is an interceptor for Dio that handles OpenId authentication
Constructors
- OpenId({required OpenIdConfiguration configuration, Dio? dio})
-
Constructor for OpenId
configurationis the OpenId configurationdiois the Dio instance to use
Properties
-
accessToken
→ Future<
String?> -
no setter
- configuration → OpenIdConfiguration
-
final
- dio → Dio?
-
final
- dioInstance → Dio
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isConnected
→ Future<
bool> -
Check if user is connecter
Return true if user is connected
Return false if user is not connected
Return false if user is connected but token is expired
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
userInfo
→ Future<
Map< String, dynamic> > -
no setter
Methods
-
clearStorageValues(
) → Future< void> -
login(
{Map< String, String> ? queryParameters}) → Future<void> - Login the user
-
logout(
) → Future< void> - Logout the user
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
DioException err, ErrorInterceptorHandler handler) → Future - Executed when an error occurs
-
onRequest(
RequestOptions options, RequestInterceptorHandler handler) → Future< void> - Executed before a request
-
onResponse(
Response response, ResponseInterceptorHandler handler) → void -
Called when the response is about to be resolved.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited