The Fifth World

Renew authentication

Since we can’t revoke a JSON Web Token once we’ve issued it, we need to set them to expire after a relatively short period of time. We’ve set ours to expire in 15 minutes. Of course, many users will want to use the API for more than 15 minutes at a time. This endpoint makes it easy to get a new JSON Web Token if you have one already, with another 15 minutes on it before it expires. Thus, so long as you make requests to renew your authentication more frequently than once every 15 minutes, you can keep a session going indefinitely.

Request

HTTP Headers
HTTP Header Value
Authorization A valid JSON Web Token, of the form Bearer ENCODEDHEADER.ENCODEDPAYLOAD.ENCODEDSIGNATURE

Examples

Example Request
POST /v1/members/reauth HTTP/1.1 Host: api.thefifthworld.com Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Response

If you’ve provided a valid JSON Web Token, the API responds with a 200 status and a new JSON Web Token as its plain text body. If you do not provide a valid JSON Web Token, the API responds with a 401 status.

Example

Example Response
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c