Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

...

Services for Account management

user--
DescriptionURIRequest MethodRequest ParamsRequest BodyResponse BodyError ConditionsAuthority
Request email validation for new user. No information is saved server-side, but a URL is sent to the specified email addressl address in which the request requested information is embedded.  The URL is a link in the Synapse Portal where user registration is completed./account/emailValidationPOST
  • domain (Synapse or Bridge) (This customizes the endpoint in the emailed URL.)
  • portal endpoint

fname

lname

email

 400 is email is invalid or 412 Status if user name or (Precondition Failed) if email is  already used.Anonymous (unauthenticated request)
Request email validation for existing account.  No information is saved server-side but a URL is sent to the specified email address in which the request information is embedded.  The URL is a link in the Synapse Portal where adding the email is completed./account/{principalId}/emailValidationPOST
  • domain (Synapse or Bridge) (This customizes the endpoint in the emailed URL.)
  • portal endpoint
email 400 is email is invalid or 412 Status if email is already used.  Create self (authenticated request)
Create new account, validating completing email address usedvalidation. (The server creates the new account, binding the user name and email aliases, then creates a session and returns the session token.)  The username, fname, lname and the email given previously are bound to the account.  A session token is returned, i.e. the user is logged in./account--POST--

user-validation-token*

username

password

first name

last name

session token400 412 Status if user name or email is invalid or already used, or 400 if the time limit has passed.--
Set or update user name for existing account./usernamePOST--username----self
Request email validation for existing account.  No information is saved server-side but a URL is sent to the specified email address in which the request information is embedded.  The URL is a link in the Synapse Portal where adding the email is completed./emailRequestPOSTdomain (Synapse or Bridge)email-- self
        
 /emailPOST email-validation-token**  Anonymous (unauthenticated request)
Complete the email validation to add a new email address to an existing account.  User making this request must match the one who initiated the email addition request (above).  If 'setNoficationEmail' request parameter is set to 'true', the new email become the user's notification email./emailPOSTsetNotificationEmailemail-validation-token**  self
Remove an email address associated with an account./emailDELETEemail  400 if email is notification emailself
Choose which email associated with the account is the notification email./notificationEmailPUT Username 404 if email is not one of the emailsself
Retrieve the email used for notification./notificationEmailGET  Username self

 

Portal provides endpoint and server appends on the right, so endpoint become a valid URL when "a1=v1&a2=v2&..." is appended and furthermore, the host name of the provided URL must be acceptable according to a regex which matches production, test or dev (local host) portal address.

 

 

*Account creation validation token contains the following, encrypted:

  • first name
  • last name
  • email
  • domain
  • time stamp

...

 

** Email validation token contains the following, encrypted:

  • email
  • principalId
  • domain

...

The information is either encrypted or sent in clear text but with a digital signature.

...

  • time stamp

 

Client Usage

Create new account

Step 1:  POST /account/emailValidation

Step 2: POST /account, including the token generated due to Step 1.

Add new email address

Step 1: POST /session to log in

Step 2: POST /account/{id}/emailValidation

Step 3: POST /email, including the token from Step 2.