UNPKG

@zigatech/keycloak-auth

Version:

Keycloak authorization library for NestJS. Works out of the box.

40 lines (39 loc) 794 B
export class Principal { id; email; phone; lastName; firstName; roles; emailVerified; constructor(id, email, emailVerified, lastName, firstName, phone, roles) { this.id = id; this.roles = roles; this.phone = phone; this.email = email; this.lastName = lastName; this.firstName = firstName; this.emailVerified = emailVerified; } getId() { return this.id; } getRoles() { return this.roles; } getPhone() { return this.phone; } getEmail() { return this.email; } getLastName() { return this.lastName; } getFirstName() { return this.firstName; } isEmailVerified() { return this.emailVerified; } }