-
Notifications
You must be signed in to change notification settings - Fork 216
RS: Fixed outdated password rotation and authorize user docs #1564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5923b05
DOC-5248 RS: Fixed outdated password rotation docs
rrelledge 0e046cb
Added breaking changes for /users/password and /users/authorize APIs …
rrelledge 02451fd
DOC-5248 Feedback update to add 401 status codes back to API reference
rrelledge 677545c
Updated 401 status code links
rrelledge 87e5840
Fixed /users/authorize breaking change description
rrelledge 8df3351
Removed redundant wording
rrelledge 1b08d99
Fixed /users/authorize breaking change description on 7.8 release not…
rrelledge e1f4bfe
Updated outdated /users/authorize REST API reference
rrelledge 7d33aa1
Added ttl default, min, and max values to /users/authorize API reference
rrelledge ca0d9bb
Fixed another error in /users/authorize breaking changes description
rrelledge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,13 +13,13 @@ weight: $weight | |
|
||
| Method | Path | Description | | ||
|--------|------|-------------| | ||
| [POST](#post-authorize) | `/v1/users/authorize` | Authorize a user | | ||
| [POST](#post-authorize) | `/v1/users/authorize` | Generate a token to authorize an authenticated user | | ||
|
||
## Authorize user {#post-authorize} | ||
|
||
POST /v1/users/authorize | ||
|
||
Generate a JSON Web Token (JWT) for a user to use as authorization to access the REST API. | ||
Generates a JSON Web Token (JWT) for a user to use as authorization to access the REST API. The request authentication header must include the relevant username and password. | ||
|
||
### Request {#post-request} | ||
|
||
|
@@ -29,12 +29,13 @@ Generate a JSON Web Token (JWT) for a user to use as authorization to access the | |
|
||
#### Example JSON body | ||
|
||
```json | ||
{ | ||
"username": "[email protected]", | ||
"password": "my_password" | ||
} | ||
``` | ||
The request body is optional unless you want to specify the token's time to live: | ||
|
||
```json | ||
{ | ||
"ttl": <time_in_seconds> | ||
} | ||
``` | ||
|
||
#### Request headers | ||
| Key | Value | Description | | ||
|
@@ -44,19 +45,19 @@ Generate a JSON Web Token (JWT) for a user to use as authorization to access the | |
|
||
#### Request body | ||
|
||
Include a [JWT authorize object]({{< relref "/operate/rs/references/rest-api/objects/jwt_authorize" >}}) with a valid username and password in the request body. | ||
Optionally include a JSON object in the request body to specify the time to live (`ttl`), which determines the amount of time in seconds the token will be valid. The default `ttl` is `300` seconds. The minimum `ttl` is `1` second and the maximum `ttl` is `86400` seconds. | ||
|
||
### Response {#post-response} | ||
|
||
Returns a JSON object that contains the generated access token. | ||
|
||
#### Example JSON body | ||
|
||
```json | ||
{ | ||
"access_token": "eyJ5bGciOiKIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXViOjE0NjU0NzU0ODYsInVpZFI1IjEiLCJleHAiOjE0NjU0Nz30OTZ9.2xYXumd1rDoE0edFzcLElMOHsshaqQk2HUNgdsUKxMU" | ||
} | ||
``` | ||
```json | ||
{ | ||
"access_token": "eyJ5bGciOiKIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXViOjE0NjU0..." | ||
} | ||
``` | ||
|
||
### Error codes {#post-error-codes} | ||
|
||
|
@@ -72,6 +73,6 @@ The following are possible `error_code` values: | |
|
||
| Code | Description | | ||
|------|-------------| | ||
| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The user is authorized. | | ||
| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | The request could not be understood by the server due to malformed syntax. | | ||
| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The user is unauthorized. | | ||
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | The user is authorized. | | ||
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | The request could not be understood by the server due to malformed syntax. | | ||
| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | The user is unauthorized. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.