Tags: #API #documentation
A standalone HTTP service that handles authenticating users between AWS Cognito and the legacy WebApp.
The Example Auth API is available through the API Gateway at these URL prefixes:
/account/confirm/admin/email/change/admin/status/change/admin/user/create/admin/user/get/email/change/email/confirm/password/change/password/confirm/signin/signin/social/signout/tokens/verify/user/signup/users/filter/email/users/filter/username/account/confirmConfirms registration of a user (i.e. they’re ‘verified’).
POST https://api.example.com/auth/account/confirm
Content-Type: application/x-www-form-urlencoded (required)code=...&username=...
code: verification code (provided by AWS)username: user to verify200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
MISSING_PARAMS |
|
400 |
SIGN_UP_CONFIRMATION_FAILED |
Multiple causes, see AWS documentation |
500 |
SIGN_UP_CONFIRMATION_FAILED |
AWS has returned an internal server error |
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/admin/email/change…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/admin/status/change…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/admin/user/create…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/admin/user/get…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/email/change…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/email/confirm…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/password/change…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/password/confirm…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/signin…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/signin/social…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/signout…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/tokens/verify…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/user/signup…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/users/filter/email…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Note: more specific exception information is logged.
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}
/users/filter/username…
METHOD https://api.example.com/auth/...
Content-Type: application/x-www-form-urlencoded (required)key=value&key=value
...: …200 OK
{
"status": "success"
}
| Status | Message | Notes |
|---|---|---|
400 |
SOME_THING |
… |
400 |
SOME_OTHER_THING |
|
Every error response takes the form
{
"status": "error",
"code": ERROR_STATUS_CODE,
"context": "ERROR_MESSAGE"
}