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

API Authentication #8

Closed
ArthurHoaro opened this issue Jun 16, 2016 · 1 comment
Closed

API Authentication #8

ArthurHoaro opened this issue Jun 16, 2016 · 1 comment

Comments

@ArthurHoaro
Copy link
Member

ArthurHoaro commented Jun 16, 2016

As discussed in #2, we need a way to authenticate clients to Shaarli's API.

I'm in favor of using JWT:

  • widely used, so there are client libraries in any language.
  • pretty much easy to implement if you want to
  • unique token for any request based on salted hash

@virtualtam has proposed to used an authentication process

When emitting several requests over an HTTP service that requires authentication, one usually:

  • opens an HTTP session with a first request carrying the credentials,
  • reuses this session to send further requests

Another possibility is OAuth in client_credentials mode. IMHO it's a bit too complex but it's not that hard:

  • the client has an ID + secret
  • get a temporary token from a refresh_token endpoint
  • carry its token in every request

EDIT: actually OAuth without a database is a bad idea, because we need to store clients, authorization code and tokens, at least.

@virtualtam
Copy link
Member

virtualtam commented Jul 2, 2016

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

No branches or pull requests

2 participants