Constructors
constructor
- new Users(options: UsersOptions): Users
Accessors
all
- get all(): Map<number, User>
Returns Map<number, User>
Methods
add
- add(user: Partial<User>, options?: AddUserOptions): Promise<void>
Parameters
- user: Partial<User>
- options: AddUserOptions = {}
get
- get(uid: number): undefined | User
Returns undefined | User
login
- login(
username: string,
password: string,
): Promise<{ cred: Credentials; user: User }> Parameters
- username: string
- password: string
Returns Promise<{ cred: Credentials; user: User }>
password
- password(oldPassword: string, newPassword: string): Promise<void>
Parameters
- oldPassword: string
- newPassword: string
Add a user to the system