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

JWT authentication #32

Open
avelino opened this issue Mar 15, 2022 · 3 comments
Open

JWT authentication #32

avelino opened this issue Mar 15, 2022 · 3 comments

Comments

@avelino
Copy link
Member

avelino commented Mar 15, 2022

Support for "closed" endpoint by authentication

  • validate http header if token is valid Authorization: Bearer <token>
@souenzzo
Copy link
Contributor

OpenAPI has the concept of "Security" in paths/routes that we can flow

https://swagger.io/specification/

@avelino
Copy link
Member Author

avelino commented Mar 21, 2022

OpenAPI has the concept of "Security" in paths/routes that we can flow

it is important that moclojer's own specification has a similar behavior to openapi's, this document will help a lot to define how we will do the implementation

@avelino
Copy link
Member Author

avelino commented Apr 28, 2023

moclojer spec for http header Authorization

- auth:
    token: ab123
    endpoint: # optional
        method: POST # default `POST`
        path: /auth # default `/auth`
    all_endpoint: false # default `false`, forces all endpoints to have authentication
    domain: moclojer.com # optional
- endpoint:
    auth: true # default `false`, if `auth.all_endpoint: true`, it is not necessary to activate this option
    auth_token: abc123 # optional, if `auth: true` it has priority over this attribute
    [...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants