...
Code Block |
---|
POST https://staging-auth.elasticbeanstalk.com/auth/v1/user
{"email":"demouser@sagebase.org", "firstName":"demo", "lastName":"user", "displayName":"Demo User", "password":"foobar"}
|
Successful Response:
Code Block |
---|
HTTP/1.1 201 Created |
...
Code Block |
---|
HTTP/1.1 400 Bad Request |
Note: As a side effect this will send an email to the given address, prompting the user to set their password.
Get User
Retrieves the user based on the session token header, which is required. Note: the "password" field will be null, since retrieving a user's password is not permitted.
...
Code Block |
---|
PUT https://staging-auth.elasticbeanstalk.com/auth/v1/user
sessionToken:<sessionToken>
{"email":"demouser@sagebase.org", "firstName":"demo", "lastName":"user", "displayName":"Demo User", "password":"foobar"}
|
where <sessionToken> is that returned by "Initiate Session", below. the "password" field is optional. If omitted or null, the password is not changed.
Note the authentication service manage the properties shown (principally the userId and password) while the repository services (below) manage other related user attributes.
...
Note: The email template is in the auth-util package, in the file resetpasswordEmail.txt. The reset link, along with the smtp parameters, is in the file authutil.properties.
Set Password
Code Block |
---|
POST https://staging-auth.elasticbeanstalk.com/auth/v1/userPassword {"email":"demouser@sagebase.org", "password":"foobar"} |
Successful Response:
Code Block |
---|
HTTP/1.1 201 Created
|
Initiate Session (Login)
Request:
...