Authentication
Provides way to authenticate user. Requires correct configuration in auth.json
to properly interface with the Portal.
GET /v1/auth/signin/{code}
Redirects the user for authentication.
Params
{code}
- Required. Valid client configured inclients.json
.
Responses
-
Code: 302
Content: Redirect to OAuth portal server. -
Code: 500
Content:{ status: 500, message: 'Error message' }
GET /v1/auth/verify/{code}
Internal, used to pass user back to User Hub before directing to client. Also creates the user if they are not found in the DB.
Params
{code}
- Required. Valid client configured inclients.json
.
Responses
-
Successful redirect.
Code: 302 -
No code provided.
Code: 404 -
Invalid code provided.
Code: 500
Content:{ status: 500, message: 'Invalid code provided' }
-
No data provided by Portal.
Code: 500
Content:{ message: "Unknown authentication strategy "provider"", status: 500 }
-
Malformed response from Portal.
Code: 500
Content:{ status: 500, message: 'No Portal ID provided' }
GET /v1/auth/signout
Destroys provided token
.
Params
token
- Required, either as GET param or cookie. The user token.
Responses
- Code: 200
Content:{ success: 1 }