File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -490,9 +490,10 @@ def refresh_oauth_token(self, refresh_token):
490
490
491
491
def expire_token (self , token ):
492
492
"""
493
- Given a token, makes a request to the authentication server to expire
494
- it immediately. This is considered a responsible way to log out a
495
- user. If you simply remove the session your application has for the
493
+ Given a token, makes a request to the authentication server to expire both
494
+ access token and refresh token.
495
+ This is considered a responsible way to log out a user.
496
+ If you remove only the session your application has for the
496
497
user without expiring their token, the user is not _really_ logged out.
497
498
498
499
:param token: The OAuth token you wish to expire
@@ -504,8 +505,9 @@ def expire_token(self, token):
504
505
:raises ApiError: If the expiration attempt failed.
505
506
"""
506
507
r = requests .post (
507
- self ._login_uri ("/oauth/token/expire " ),
508
+ self ._login_uri ("/oauth/revoke " ),
508
509
data = {
510
+ "token_type_hint" : "access_token" ,
509
511
"client_id" : self .client_id ,
510
512
"client_secret" : self .client_secret ,
511
513
"token" : token ,
You can’t perform that action at this time.
0 commit comments