KeycloakService class

@author Gibah Joseph email: gibahjoe@gmail.com Nov, 2020

Constructors

KeycloakService(KeycloakConfig config)

Properties

authenticated → dynamic
no setter
hashCode int
The hash code for this object.
no setterinherited
keycloakEventsStream Stream<KeycloakEvent>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
getToken([bool forceLogin = false]) Future<String>
init({KeycloakInitOptions? initOptions, bool loadUserProfileAtStartUp = false}) Future<bool>
isLoggedIn() Future<bool>
Check if user is logged in.
isTokenExpired([num? minValidity]) bool
Returns true if the token has less than minValidity seconds left before it expires.
loadUserProfile([bool forceReload = false]) FutureOr<KeycloakProfile?>
login([KeycloakLoginOptions? options]) Future<void>
logout([KeycloakLogoutOptions? options]) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateToken([num minValidity = 5]) Future<bool>
If the token expires within minValidity seconds the token is refreshed. If the session status iframe is enabled, the session status is also checked. Returns a promise telling if the token was refreshed or not. If the session is not active anymore, the promise is rejected.

Operators

operator ==(Object other) bool
The equality operator.
inherited