MandarineSecurity.Auth.UserDetails
import type { MandarineSecurity } from "https://raw.githubusercontent.com/mandarineorg/mandarinets/master/mod.ts";
const { UserDetails } = MandarineSecurity.Auth;
Interface for the minimum of information a user model must have when using Mandarine's built-in authentication.
interface UserDetails {
accountExpired: boolean;
accountLocked: boolean;
credentialsExpired: boolean;
enabled: boolean;
password: string;
roles: Array<GrantedAuthority> | Array<string>;
uid: number | string;
username: string;
}§Properties
§
accountExpired: boolean
[src]Indicates whether the user's account has expired. An expired account cannot be authenticated.
§
accountLocked: boolean
[src]Indicates whether the user is locked or unlocked. A locked user cannot be authenticated.
§
credentialsExpired: boolean
[src]Indicates whether the user's credentials (password) has expired. An account with expired credentials cannot be authenticated.
§
enabled: boolean
[src]Indicates whether the user is enabled or disabled. A disabled user cannot be authenticated.
§
roles: Array<GrantedAuthority> | Array<string>
[src]Returns an array with the roles the current user has. Cannot return null nor undefined inside the array. Ex: ["ADMIN", "MODERATOR", "USER"]