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

Authentication #109

Merged
merged 12 commits into from
May 24, 2016
Merged

Authentication #109

merged 12 commits into from
May 24, 2016

Conversation

buchi
Copy link
Member

@buchi buchi commented May 20, 2016

Provides a PAS plugin for JWT based authentication.
Provides endpoints /@login, /@logout and /@login-renew

@tisto
Copy link
Sponsor Member

tisto commented May 21, 2016

@sneridagh you already reviewed that pull request, right? Do we have an Angular 2 client implementation from the sprint already?

@sneridagh
Copy link
Member

sneridagh commented May 21, 2016

@tisto The only thing I miss is the documentation, the rest is good for me. The frontend team were using a basic half backed mockup for it all the time.

@buchi could you provide it? Do we have a way to delete expired tokens?

@lukasgraf lukasgraf mentioned this pull request May 21, 2016
3 tasks
@tisto
Copy link
Sponsor Member

tisto commented May 21, 2016

@buchi do you have time to finish the docs in the next days? If not it would be great if you could provide us with a few basic examples so we can finish the docs (or maybe just point us to a few tests?).

@buchi
Copy link
Member Author

buchi commented May 21, 2016

Will add the documentation asap, although I'm quite busy the next week because we (4teamwork) are moving to a new office.

@sneridagh Currently there's no automatic cleanup of stored tokens. I think we don't need that very much, because I see mainly two use cases:

  1. JS client authentication: In this case I would not store the token on the server at all, but let it expire after some time (e.g. 12h). That's the default configuration of the PAS plugin.
  2. Long term authentication token for apps: In this case the token should never expire, thus we need the ability to invalidate it. For this we have to store the token on the server. You can change the configuration of the PAS plugin to behave like this. The token can be manually deleted by calling the @logout endpoint.

@sneridagh
Copy link
Member

@buchi If you're busy next week I can write it down for you if you wish.

@buchi
Copy link
Member Author

buchi commented May 24, 2016

@sneridagh I've added minimal documentation now but thanks anyway.

Should be ready for merging now.

@lukasgraf
Copy link
Member

Tested the described functionality according to the documentation, works like a charm 🎉 (tested login, renewal, invalidating stored tokens, error response when trying to invalidate non-stored token, error response when trying to invalidate tokens twice).

tokens are not persisted on the server and thus can not be invalidated. To enable
token invaldiation, activate the ``store_tokes`` option in the PAS plugin. If you
need tokens that are valid indefinitly you should also disalbe the use of Plone's
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indefinitly -> indefinitely, disalbe -> disable

@lukasgraf
Copy link
Member

The renewal endpoint name in the pull request body should be updated from /@refresh-login to /@login-renew

@buchi
Copy link
Member Author

buchi commented May 24, 2016

Fixed typos in documentation

@tisto tisto merged commit 8698c0c into master May 24, 2016
@tisto tisto deleted the authentication branch May 24, 2016 09:58
@tisto tisto removed the in progress label May 24, 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

Successfully merging this pull request may close these issues.

None yet

4 participants