OpenMF icon indicating copy to clipboard operation
OpenMF copied to clipboard

Implemented token based authentication

Open amlannandy opened this issue 4 years ago • 0 comments

Description

Login with react app doesn't persist the session in flask_login. So, we can return a auth token to the user on login. Which can be used in the Authorization header for accessing protected routes.

Fixes #84

Type of change

  • [x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Try using a protected route without login, using the auth token in header.

Test Configuration:

  • Chrome
  • Postman
  • Windows 10

screen-capture (1)

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

amlannandy avatar Feb 24 '21 04:02 amlannandy