-
-
Notifications
You must be signed in to change notification settings - Fork 797
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
Reviewed authenticator and made refreshToken method public. #1831
Conversation
Tests fail due to Symfony 6, most of it is covered with #1800, but still cannot find a way to re-enabled sessions in test env in that version. |
|
b95896d
to
865aedf
Compare
@gassan Requires one more rebase (sorry ;)). |
865aedf
to
122c67d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gassan Just please squash your commits into one :)
…hToken function public, so we can refresh access token from outside (Listener), login to oauth instance with a LoginForm - 'password' grand, etc
4240f92
to
679e544
Compare
its done with rebasing on your latest master commit. thx |
Great! Thank you @gassan for this changes & for support in testing other mine changes! |
With the new authentication manager the access token could not be refreshed by a request listener without copying part of the code from the OAuthAuthenticator. I had reviewed authenticator and:
authenticate()
function a ready to useOAuthToken
, I have extended SelfValidatedPassport and pass token to them instead of a UserBadge.OAuthRememberMeToken
. You can store resource owner name and refresh_token with unlimited lifetime (usually you can get it with scopeoffline
) in the db and get a new access token every time without asking credentials.OAuthRememberMeToken
is the same likeOAuthToken
(will expired, refreshed etc), but has an string $series property, which must be always copied from the expired token to a new one, that's why I have permitted myself to addcopyPersistentDataTo(self $token): void
toOAuthToken
.Feel free to ask or suggest something.