8000 Add support for refresh token · Issue #114 · endatix/endatix · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add support for refresh token #114
Closed
@PeterMarinov

Description

@PeterMarinov

Important

This must be implemented with using the feature/46-integrate-identity as a feature branch. You will branch from it and when ready simply make a PR back to the feature/46-integrate-identity

Goal

We want to allow clients of the API to be able to use Refresh tokens to renew their JWT tokens without the need to send their credentials again

Scope

  • Add refresh token endpoint
  • Add revoke token endpoint out-of-scope
  • Modify authorization logic to return 401 with token_expired error as (if) required - (according to the spec rfc6750 - "The OAuth 2.0 Authorization Framework: Bearer Token Usage", https://www.rfc-editor.org/rfc/rfc6750, p.8, section 3.1, resource server should return 401)
  • Update config values as required e.g. add refresh token lifetime value

Acceptance Criteria

  • Users with valid, but expired JWT token can make a call to the refresh endpoint and receive a new token
  • Anonymous users cannot access the refresh token endpoint
  • Refresh tokens renew JWT token only of the JWT token is valid and the Refresh token is valid and they belong to the same user
  • Refresh tokens can only be used once
  • Users with expired tokens receive 401 error with token expired error
  • Revoke token endpoint invalidates the refresh token
  • Refresh request with revokend refresh token returns an error
  • Users can have no more than one refresh token at a time

Deliverables

  • Working endpoints
  • Tests

Proposed Solution

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0