authService

AngularJS Service for storing authentication of the user.

Members

(private, inner) authentication :Object

Stored authentication object.

Properties:
Name Type Attributes Description
isAuth boolean
token string <nullable>
userId number <nullable>
Source:
Type:
  • Object

Methods

(static) clearAuthentication() → {Object}

Resets module:authService~authentication to defaults and clears authentication in localStorage.

Source:
Returns:
Type:
Object

(static) getAuthentication() → (nullable) {Object}

Get authentication object from module:authService~authentication or localStorage. The internal variable is updated if retrieved from localStorage.

Source:
Returns:
Type:
Object

The authentication object.

(static) setAuthentication(authnullable, rememberopt)

Set authentication object in module:authService~authentication and localStorage.

Source:
Parameters:
Name Type Attributes Description
auth Object <nullable>
remember boolean <optional>