Skip to content
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

feat(auth): implement authentication apis #126

Conversation

donch1989
Copy link
Member

Because

  • we are going to support simple authentication in Instill-Core

This commit

  • implement authentication apis

@linear
Copy link

linear bot commented Sep 20, 2023

INS-1882 implement simple username/password authentication in mgmt-backend

API:

  • /base/v1alpha/auth/login:

    • Request:

      {
        "username": "username",
        "password": "password",
      }
      
    • Response

      200 {
        "access_token": "eyJhbGciOiJIU....."
      }
      
  • /base/v1alpha/auth/logout:

    • Request:

      Header: Authorization: Bearer <access_token>
      
    • Response: 200 or 401

    • Note: the backend won't implement this in the first version, please handle logout directly (clear token) on frontend side

  • /base/v1alpha/auth/validate_access_token:

  • Request

    Header: Authorization: Bearer <access_token>
    
  • Response: 200 or 401

  • /base/v1alpha/auth/change_password

    • Request

      Header: Authorization: Bearer <access_token>
      {
        "old_password": "old_password",
        "new_password": "new_password",
      }
      
    • Response: 200 or 401

@donch1989 donch1989 force-pushed the huitang/ins-1882-implement-simple-usernamepassword-authentication-in-mgmt branch from ccc4db5 to 6f293a0 Compare September 20, 2023 14:17
@donch1989 donch1989 marked this pull request as draft September 20, 2023 14:29
@donch1989 donch1989 marked this pull request as ready for review September 21, 2023 05:26
@donch1989 donch1989 merged commit 4ae7e73 into main Sep 21, 2023
9 of 10 checks passed
@donch1989 donch1989 deleted the huitang/ins-1882-implement-simple-usernamepassword-authentication-in-mgmt branch September 21, 2023 06:03
donch1989 pushed a commit that referenced this pull request Sep 30, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.6.0-alpha](v0.5.0-alpha...v0.6.0-alpha)
(2023-09-30)


### Features

* **auth:** implement authentication apis
([#126](#126))
([4ae7e73](4ae7e73))
* **auth:** support `api_token` authentication
([#128](#128))
([73c113c](73c113c))


### Bug Fixes

* **init:** fix default user creation bug
([#130](#130))
([1ede4d8](1ede4d8))


### Miscellaneous Chores

* **release:** release v0.6.0-alpha
([ef65c9e](ef65c9e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants