baasic-sdk-angularjs
Version:
AngularJS SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).
77 lines (47 loc) • 1.73 kB
Markdown
# baasicPasswordRecoveryService
Baasic Password Recovery Service provides an easy way to consume Baasic Password Recovery REST API end-points.
* * *
### baasicPasswordRecoveryService.requestReset()
Returns a promise that is resolved once the password recovery requestReset action is completed. This action initiates the password recovery process for the user.
**Example**:
```js
baasicPasswordRecoveryService.requestReset({
challengeIdentifier : '<challenge-identifier>',
challengeResponse : '<challenge-response>',
recoverUrl : '<recover-url>',
username : '<username>'
})
.success(function () {
// perform success action here
})
.error(function (data) {
// perform error handling here
})
.finally (function () {});
```
### baasicPasswordRecoveryService.reset()
Returns a promise that is resolved once the password reset action is completed. This updates user's password selection.
**Example**:
```js
baasicPasswordRecoveryService.reset({
newPassword : '<new-password>',
passwordRecoveryToken : '<password-recovery-token>'
})
.success(function () {
// perform success action here
})
.error(function (data) {
// perform error handling here
})
.finally (function () {});
```
### baasicPasswordRecoveryService.routeService()
Provides direct access to route definition.
**Example**:
```js
baasicPasswordRecoveryService.routeService.get('<id>', expandObject);
```
* * *
**Notes:**
- Refer to the [Baasic REST API](http://dev.baasic.com/api/reference/home) for detailed information about available Baasic REST API end-points.
- All end-point objects are transformed by the associated route service.