CarpAuthService class
- Inheritance
-
- Object
- CarpAuthBaseService
- CarpAuthService
Constructors
- CarpAuthService()
-
Returns the singleton default instance of the CarpAuthService.
Before this instance can be used, it must be configured using the
configure method.
factory
- CarpAuthService.instance()
Properties
- authEndpointUri → Uri
-
The URI for the authenticated endpoint for this CarpService.
no setter
- authenticated → bool
-
Is a user authenticated?
If
true
, the authenticated user is currentUser.no setter - authProperties → CarpAuthProperties
-
The CARP app associated with the CARP Web Service.
Returns
null
if this service has not yet been configured via the configure method.no setteroverride -
authStateChanges
→ Stream<
AuthEvent> -
Notifies about changes to the user's authentication state (such as sign-in
or sign-out) as defined in
AuthEvent
.no setter - currentUser ↔ CarpUser
-
Gets the current user.
Returns
null
if no user is authenticated.getter/setter pairoverride-getter - hashCode → int
-
The hash code for this object.
no setterinherited
- isConfigured → bool
-
Has this service been configured?
no setterinherited
- manager → OidcUserManager?
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticate(
) → Future< CarpUser> - Authenticate to this CARP service, that opens the authentication page of the Identity Server using a secure web view from the OS.
-
authenticateWithUsernamePassword(
{required String username, required String password}) → Future< CarpUser> -
Authenticate to this CARP service using a
username
andpassword
. -
configure(
CarpAuthProperties authProperties) → Future< void> -
Configure the this instance of a Carp Service.
override
-
configureFrom(
CarpAuthBaseService service) → void -
Configure from another
service
which has already been configured and potentially authenticated.inherited -
getCurrentUserProfile(
OidcUser response) → CarpUser - Gets the CARP profile of the current user from the JWT token
-
initManager(
) → Future< void> -
logout(
) → Future< void> - Log out from this CARP service
-
logoutNoContext(
) → Future< void> - Log out of this CarpService, by clearing the current user.
-
nonNullAble<
T> (T? argument) → T - Makes sure that the CarpApp or CarpUser is configured, by throwing a CarpServiceException if they are null. Otherwise, returns the non-null value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
) → Future< CarpUser> - Get a new access token for the current user based on the previously granted refresh token, using the Identity Server discovery URL.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited