Account Creation, Refresh Tokens & Postman

From Cubex Wiki
Jump to: navigation, search

Step 1. Register:

WikiRegister.jpg

Step 1.5 Confirm Email

If you are running on your local server, it will send an e-mail to the e-mail address specified.

You need to click on the link to confirm your e-mail before you can proceed.

If you are running on Azure, there may be a problem encountered sending the e-mail.

In that case you need to connect to the database via Visual Studio and run the following script:

Update AspNetUsers

Set EmailConfirmed=1


Step 2. Get Access / Refresh Token Pair:

a) The user must have Registered and Confirmed his e-mail.

b) Note, it must be x-www-form-urlencoded.

c) grant_type must be password.

d) The client_id must be set to Nimbus.Web.

e) This will give you the Access Token and the Refresh Token.

f) The “.expires” will tell you when the Access Token (not the Refresh Token) will expire (in UTC).

WikiRequestToken.jpg


Step 3. Requesting Resources with Access Token:

The “Authorization” header needs to have “Bearer AccessToken”.

WikiGetWithToken.jpg


Step 4. Requesting a new Access / Refresh Token pair given the previous Refresh Token:

a) Note, it must be x-www-form-urlencoded.

b) grant_type must be refresh_token.

c) The client_id must be set to Nimbus.Web.

d) This will give you the new Access Token and the Refresh Token.

 WikiGetNewToken.jpg