-
-> Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
-
-Auth microservice basic example
-
-Base URLs:
-
-* http://localhost:3000
-
-# Authentication
-
-- HTTP Authentication, scheme: bearer
-
-
-
-|Name|In|Type|Required|Description|
-|---|---|---|---|---|
-|body|body|[LoginRequest](#schemaloginrequest)|false|none|
-
-> Example responses
-
-
Responses
-
-|Status|Meaning|Description|Schema|
-|---|---|---|---|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Auth Code|None|
-|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|The syntax of the request entity is incorrect.|None|
-|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Invalid Credentials.|None|
-|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|The entity requested does not exist.|None|
-|422|[Unprocessable Entity](https://tools.ietf.org/html/rfc2518#section-10.3)|The syntax of the request entity is incorrect|None|
-
-
-
-|Status|Meaning|Description|Schema|
-|---|---|---|---|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Token Response Model|[TokenResponse](#schematokenresponse)|
-|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|The syntax of the request entity is incorrect.|None|
-|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Invalid Credentials.|None|
-|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|The entity requested does not exist.|None|
-|422|[Unprocessable Entity](https://tools.ietf.org/html/rfc2518#section-10.3)|The syntax of the request entity is incorrect|None|
-
-
-
-## LoginController.me
-
-
-
-> Code samples
-
-```'javascript--nodejs
-const fetch = require('node-fetch');
-
-const headers = {
- 'Authorization':'Bearer {access-token}'
-};
-
-fetch('http://localhost:3000/auth/me',
-{
- method: 'GET',
-
- headers: headers
-})
-.then(function(res) {
- return res.json();
-}).then(function(body) {
- console.log(body);
-});
-
-```
-
-`GET /auth/me`
-
-To get the user details
-
-> Example responses
-
-
Responses
-
-|Status|Meaning|Description|Schema|
-|---|---|---|---|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|User Object|None|
-|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|The syntax of the request entity is incorrect.|None|
-|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Invalid Credentials.|None|
-|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|The entity requested does not exist.|None|
-|422|[Unprocessable Entity](https://tools.ietf.org/html/rfc2518#section-10.3)|The syntax of the request entity is incorrect|None|
-
-
Response Schema
-
-
-
-## LoginController.getToken
-
-
-
-> Code samples
-
-```'javascript--nodejs
-const fetch = require('node-fetch');
-const inputBody = {
- "code": "string",
- "clientId": "string"
-};
-const headers = {
- 'Content-Type':'application/json',
- 'Accept':'application/json',
- 'device_id':'string'
-};
-
-fetch('http://localhost:3000/auth/token',
-{
- method: 'POST',
- body: JSON.stringify(inputBody),
- headers: headers
-})
-.then(function(res) {
- return res.json();
-}).then(function(body) {
- console.log(body);
-});
-
-```
-
-`POST /auth/token`
-
- Send the code received from the above api and this api will send you refresh token and access token (webapps)
-
-> Body parameter
-
-```json
-{
- "code": "string",
- "clientId": "string"
-}
-```
-
-
-
-|Status|Meaning|Description|Schema|
-|---|---|---|---|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|New Token Response|[TokenResponse](#schematokenresponse)|
-|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|The syntax of the request entity is incorrect.|None|
-|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Invalid Credentials.|None|
-|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|The entity requested does not exist.|None|
-|422|[Unprocessable Entity](https://tools.ietf.org/html/rfc2518#section-10.3)|The syntax of the request entity is incorrect|None|
-
-
-
-
-
-|Status|Meaning|Description|Schema|
-|---|---|---|---|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Check if Token Is Valid and not Expired.|None|
-
-
-
-
-
-|Status|Meaning|Description|Schema|
-|---|---|---|---|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Sucess Response.|[LocalUserProfileDto](#schemalocaluserprofiledto)|
-|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|The syntax of the request entity is incorrect.|None|
-|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Invalid Credentials.|None|
-|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|The entity requested does not exist.|None|
-|422|[Unprocessable Entity](https://tools.ietf.org/html/rfc2518#section-10.3)|The syntax of the request entity is incorrect|None|
-
-
-
-## SignupRequestController.verifyInviteToken
-
-
-
-> Code samples
-
-```'javascript--nodejs
-const fetch = require('node-fetch');
-
-fetch('http://localhost:3000/auth/sign-up/verify-token',
-{
- method: 'GET'
-
-})
-.then(function(res) {
- return res.json();
-}).then(function(body) {
- console.log(body);
-});
-
-```
-
-`GET /auth/sign-up/verify-token`
-
-
Responses
-
-|Status|Meaning|Description|Schema|
-|---|---|---|---|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Sucess Response.|None|
-|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|The syntax of the request entity is incorrect.|None|
-|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Invalid Credentials.|None|
-|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|The entity requested does not exist.|None|
-|422|[Unprocessable Entity](https://tools.ietf.org/html/rfc2518#section-10.3)|The syntax of the request entity is incorrect|None|
-
-
-
-
-
-|Status|Meaning|Description|Schema|
-|---|---|---|---|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Array of AuthClient model instances|Inline|
-
-
-
-|Name|In|Type|Required|Description|
-|---|---|---|---|---|
-|Authorization|header|string|false|This is the access token which is required to authenticate user.|
-|body|body|[RefreshTokenRequestPartial](#schemarefreshtokenrequestpartial)|false|none|
-
-> Example responses
-
-> 200 Response
-
-```json
-{
- "success": true
-}
-```
-
-
Responses
-
-|Status|Meaning|Description|Schema|
-|---|---|---|---|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Success Response|[SuccessResponse](#schemasuccessresponse)|
-|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|The syntax of the request entity is incorrect.|None|
-|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Invalid Credentials.|None|
-|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|The entity requested does not exist.|None|
-|422|[Unprocessable Entity](https://tools.ietf.org/html/rfc2518#section-10.3)|The syntax of the request entity is incorrect|None|
-
-
-
-
-
-|Status|Meaning|Description|Schema|
-|---|---|---|---|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Array of ToDo model instances|Inline|
-
-
-
-
-
-
-
-
-```json
-{
- "client_id": "string",
- "client_secret": "string",
- "username": "string",
- "password": "string"
-}
-
-```
-
-LoginRequest
-
-### Properties
-
-|Name|Type|Required|Restrictions|Description|
-|---|---|---|---|---|
-|client_id|string|true|none|This property is supposed to be a string and is a required field|
-|client_secret|string|true|none|This property is supposed to be a string and is a required field|
-|username|string|true|none|This property is supposed to be a string and is a required field|
-|password|string|true|none|This property is supposed to be a string and is a required field|
-
-
TokenResponse
-
-
-
-
-
-
-```json
-{
- "accessToken": "string",
- "refreshToken": "string",
- "expires": 0,
- "pubnubToken": "string"
-}
-
-```
-
-TokenResponse
-
-### Properties
-
-|Name|Type|Required|Restrictions|Description|
-|---|---|---|---|---|
-|accessToken|string|true|none|This property is supposed to be a string and is a required field|
-|refreshToken|string|true|none|This property is supposed to be a string and is a required field|
-|expires|number|true|none|none|
-|pubnubToken|string|false|none|none|
-
-
-
-
-
-
-
-
-```json
-{
- "client_id": "string",
- "client_secret": "string"
-}
-
-```
-
-ClientAuthRequest
-
-### Properties
-
-|Name|Type|Required|Restrictions|Description|
-|---|---|---|---|---|
-|client_id|string|true|none|This property is supposed to be a string and is a required field|
-|client_secret|string|true|none|This property is supposed to be a string and is a required field|
-
-
ResetPasswordPartial
-
-
-
-
-
-
-```json
-{
- "refreshToken": "string",
- "username": "string",
- "password": "string",
- "oldPassword": "string"
-}
-
-```
-
-ResetPasswordPartial
-
-### Properties
-
-|Name|Type|Required|Restrictions|Description|
-|---|---|---|---|---|
-|refreshToken|string|false|none|none|
-|username|string|false|none|This property is supposed to be a string and is a required field|
-|password|string|false|none|This property is supposed to be a string and is a required field|
-|oldPassword|string|false|none|This property is supposed to be a string and is a required field|
-
-
ResetPassword
-
-
-
-
-
-
-```json
-{
- "refreshToken": "string",
- "username": "string",
- "password": "string",
- "oldPassword": "string"
-}
-
-```
-
-ResetPassword
-
-### Properties
-
-|Name|Type|Required|Restrictions|Description|
-|---|---|---|---|---|
-|refreshToken|string|true|none|none|
-|username|string|true|none|This property is supposed to be a string and is a required field|
-|password|string|true|none|This property is supposed to be a string and is a required field|
-|oldPassword|string|false|none|This property is supposed to be a string and is a required field|
-
-