new Authentication($http, $injector, authenticationBaseUrl, gmfUser)
An "authentication" service for a GeoMapFish application. Upon loading, it launches a request to determine whether a user is currently logged in or not.
The possible API requests it supports, which are all self-explanatory, are:
- changePassword
- login
- logout
- resetPassword
Parameters:
Name | Type | Description |
---|---|---|
$http |
angular.$http | Angular http service. |
$injector |
angular.$injector | Main injector. |
authenticationBaseUrl |
string | URL to "authentication" web service. |
gmfUser |
gmfx.User | User. |
Extends
- ol.events.EventTarget
Methods
changePassword(oldPwd, newPwd, confPwd)
Parameters:
Name | Type | Description |
---|---|---|
oldPwd |
string | Old password. |
newPwd |
string | New password. |
confPwd |
string | New password confirmation. |
Returns:
angular.$q.Promise
Promise.
getFunctionalities()
Returns:
?gmfx.AuthenticationFunctionalities
The role functionalities.
getRoleId()
Returns:
number|null
The role ID.
login(login, pwd)
Parameters:
Name | Type | Description |
---|---|---|
login |
string | Login name. |
pwd |
string | Password. |
Returns:
angular.$q.Promise
Promise.
logout()
Returns:
angular.$q.Promise
Promise.
resetPassword(login)
Parameters:
Name | Type | Description |
---|---|---|
login |
string | Login name. |
Returns:
angular.$q.Promise
Promise.