Class: User

User(token, password, data)

Logged in user credentials and settings.

Constructor

new User(token, password, data)

Instantiates the user.

Parameters:
Name Type Description
token string

is the authentication token obtained with the login.

password string

of the user

data Object

is the logged in user data which contains the username the role and settings.

Author:
  • Mihail Radkov
  • Svilen Velikov
Source:

Methods

clearToken()

Removes the token which effectively make the user unauthenticated.

Source:

getAuthorities() → {Array.<string>}

Source:
Returns:

an array of user roles.

Type
Array.<string>

getPassword() → {string}

Source:
Returns:

the user's password.

Type
string

getToken() → {string}

Source:
Returns:

the authentication token.

Type
string

getUsername() → {string}

Source:
Returns:

the logged in username.

Type
string