Stateless#68
Merged
taylorotwell merged 5 commits intolaravel:2.0from May 11, 2015
isaackearl:stateless
Merged
Conversation
.gitignore
Outdated
Contributor
Author
|
Let me know if there is anything else I could improve upon, or if there is another approach you want me to take to solve this problem. |
Contributor
|
This should probably go to 3.0, not 2.0. |
Contributor
Author
|
Hey Graham, Sorry for being a noob but I'm hoping you can give me a bit of direction. After pulling in the master branch, it seems as though the 2.0 version is actually ahead of the 3.0 version by a few commits. I was going to close this pull request and add something similar to 3.0, but I think it would cause some merging conflicts when it comes time to merge. Shall I leave this here for now? Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm working on a project that is an API, which utilizes JWT tokens, and is stateless.
Having a stateless option would very nice so that I can use socialite without utilizing the session. I've made some modifications to have it check if the stateless flag has been set. By default it acts exactly as it did before so this change will not affect any current users.
it can be used like this for the redirect:
and like this for the user:
of course it can still be used in conjuction with scopes etc
The main use case is if somebody is doing the redirect (authorization) portion using a frontend client like angular etc. Then they want to be able to make a request to the backend and get the user... so in that case the redirect() function would never be used and a stateless option is needed for the user() function.
If you don't like it please let me know if there is another approach I could take that might get accepted.