Skip to main content
Module

x/mandarinets/mod.ts>MandarineSecurity.Auth.UserDetails

Mandarine.TS is a typescript, decorator-driven framework that allows you to create server-side applications. Mandarine.TS provides a range of built-in solutions such as Dependency Injection, Components, ORM and more. Under its umbrella, Mandarine.TS has 4 modules: Core, Data, Security and MVC, these modules will offer you the requirements to build a Mandarine-powered application.
Latest
interface MandarineSecurity.Auth.UserDetails
import { type MandarineSecurity } from "https://deno.land/x/mandarinets@v2.3.2/mod.ts";
const { UserDetails } = MandarineSecurity.Auth;

Interface for the minimum of information a user model must have when using Mandarine's built-in authentication.

Properties

roles: Array<GrantedAuthority> | Array<string>

Returns an array with the roles the current user has. Cannot return null nor undefined inside the array. Ex: ["ADMIN", "MODERATOR", "USER"]

password: string

Returns the password (encrypted) of the current user.

username: string

Returns the username of the current user

uid: number | string

Returns the id of the current user

accountExpired: boolean

Indicates whether the user's account has expired. An expired account cannot be authenticated.

accountLocked: boolean

Indicates whether the user is locked or unlocked. A locked user cannot be authenticated.

credentialsExpired: boolean

Indicates whether the user's credentials (password) has expired. An account with expired credentials cannot be authenticated.

enabled: boolean

Indicates whether the user is enabled or disabled. A disabled user cannot be authenticated.