JwtService class
Serviço de token JWT (HS256) — emite e valida tokens próprios do app.
Para Firebase Auth, veja FirebaseAuthVerifier (valida o ID token do Firebase).
Constructors
- JwtService(String secret, {String? issuer})
-
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sign(
Map< String, Object?> claims, {Duration expiresIn = const Duration(days: 7)}) → String -
Emite um token assinado com
claims(ex.:{sub, email, role}). -
toString(
) → String -
A string representation of this object.
inherited
-
verify(
String token) → Map< String, Object?> ? -
Valida o token; retorna os claims ou
nullse inválido/expirado.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited