-
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
// Changes the password of the currently authenticated user. | ||
.arguments | ||
password:string | ||
.description:Changes the password of the currently authenticated user | ||
.type:public | ||
|
||
// Sanity checking invocation. | ||
validators.mandatory:x:@.arguments/*/password | ||
validators.string:x:@.arguments/*/password | ||
min:12 | ||
|
||
// Ensures user is authorized to access endpoint. | ||
auth.ticket.verify | ||
|
||
/* | ||
* Invokes the slot that does the heavy lifting, and updates the user's current password. | ||
* | ||
* This slot will change the password of the currently logged in user. | ||
*/ | ||
unwrap:x:+/* | ||
signal:magic.auth.change-password | ||
password:x:@.arguments/*/password | ||
|
||
// Returns success to caller. | ||
return-nodes | ||
result:success |