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

Revoking Access to Client? #479

Closed
lonnieezell opened this issue Jan 14, 2016 · 4 comments
Closed

Revoking Access to Client? #479

lonnieezell opened this issue Jan 14, 2016 · 4 comments

Comments

@lonnieezell
Copy link

I'm trying to provide clients the ability to revoke the authorization token for the application so that they would have to go through the login process again. Is there a way to do so with this library? I can't find one.

For example, with Facebook we'd have to send an HTTP DELETE request to /PROFILE_ID/permissions.

@shadowhand
Copy link
Member

That's entirely up to the provider you are authorizing against. This library only provides an abstraction of the standard OAuth2 spec, which does not include any standard for revoking tokens outside of normal expiration.

@lonnieezell
Copy link
Author

Bummer. Thanks for the response. Would be a nice addition to simple have a 'revoke()' method in the AbstractProvider so other providers can implement, though.

@stevenmaguire
Copy link
Member

You could also use the getAuthenticatedRequest.

$request = $provider->getAuthenticatedRequest(
    'DELETE',
    '/PROFILE_ID/permissions',
    $accessToken
);

@ramsey
Copy link
Contributor

ramsey commented Feb 1, 2016

Since it's non-standard, I don't think a revoke() method on the AbstractProvider is necessary. However, you might propose that the league/oauth2-facebook provider add a revoke() method that does exactly what @stevenmaguire suggests. :-)

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

4 participants