UNPKG

graphdb

Version:

Javascript client library supporting GraphDB and RDF4J REST API.

48 lines (47 loc) 1.24 kB
export = User; /** * Logged in user credentials and settings. * * @class * @author Mihail Radkov * @author Svilen Velikov */ declare class User { /** * Instantiates the user. * @param {string} token is the authentication token obtained with the login. * @param {string} password of the user * @param {Object} data is the logged in user data which contains the username * the role and settings. */ constructor(token: string, password: string, data: any); token: string; password: string; data: any; /** * @return {string} the authentication token. */ getToken(): string; /** * Removes the token which effectively make the user unauthenticated. */ clearToken(): void; /** * @return {string} the logged in username. */ getUsername(): string; /** * @return {string} the user's password. */ getPassword(): string; /** * @return {Array<string>} an array of user roles. */ getAuthorities(): Array<string>; /** * @private * @param {string} name is the property name * @return {*} the property value or undefined if data or property is missing. */ private getProperty; }