Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

MandarineSecurity.Auth.UserDetails

import type { MandarineSecurity } from "https://raw.githubusercontent.com/mandarineorg/mandarinets/master/security-core/mandarine-security.ns.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.

§
password: string
[src]

Returns the password (encrypted) of the current user.

§
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"]

§
uid: number | string
[src]

Returns the id of the current user

§
username: string
[src]

Returns the username of the current user