    import UserRepository from 'pvbid-sdk/src/repositories/UserRepository.js'

public class | source

# UserRepository

#### Extends:

BaseRepository → UserRepository

## Constructor Summary

Public Constructor
public | constructor() |

## Method Summary

Public Methods
public | async getAuthToken(username: string, password: string): Promise<object> Obtains an access token for a user |
public | async me(): Promis<object> Gets the current user. |

## Inherited Summary

From class BaseRepository
public | endpoint: * |
public | http: * |
public | httpConfig: * |
public | map: {"single": *, "multi": *} |
public | metaData: * |
public | params: {} |
public | async create(entity: BidEntity): Promise<BidEntity> Persists a new entity |
public | async delete(id: number): Promise<Object> Deletes a single entity by its id |
public | async findById(id: number): Promise<BidEntity> Retrieves a single domain object by its id. |
public | async get(params: Object): Promise<BidEntity[]> Retrieves an array of results for the endpoint |
public | async save(entity: BidEntity): Promise<BidEntity> Persists an update to the entity |

## Public Constructors

### public constructor() source

Creates an instance of BaseRepository.

#### Override:

BaseRepository#constructor

## Public Methods

### public async getAuthToken(username: string, password: string): Promise<object> source

Obtains an access token for a user

#### Params:

Name | Type | Attribute | Description
username | string |  |
password | string |  |

#### Return:

Promise<object>

#### Return Properties:

Name | Type | Attribute | Description
token_type | string |  |
expires_in | number |  | Unix timestamp
access_token | string |  |
refresh_token | string |  |

### public async me(): Promis<object> source

Gets the current user.

#### Return:

Promis<object>

#### Return Properties:

Name | Type | Attribute | Description
id | number |  |
name | string |  |
email | string |  |
timezone | string |  |
permissions | string[] |  |
roles | string[] |  |
account | object |  |