UmamiAuthService class

Service for authentication with the Umami API.

This authentication method is only for self-hosted Umami. For Umami Cloud, you simply need to generate an API key.

Constructors

UmamiAuthService({required String endpoint})
Creates an instance of UmamiAuthService.

Properties

endpoint String
Base endpoint of the Umami API.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getToken({required String username, required String password}) Future<String?>
Extracts just the token from login response.
isTokenValid(String token) Future<bool>
Checks if the token is still valid (returns boolean).
login({required String username, required String password}) Future<Map<String, dynamic>?>
Logs in and returns the authentication response if successful.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
verifyToken(String token) Future<Map<String, dynamic>?>
Verifies if the token is still valid.

Operators

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