File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -490,9 +490,10 @@ def refresh_oauth_token(self, refresh_token):
490490
491491 def expire_token (self , token ):
492492 """
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
496497 user without expiring their token, the user is not _really_ logged out.
497498
498499 :param token: The OAuth token you wish to expire
@@ -504,8 +505,9 @@ def expire_token(self, token):
504505 :raises ApiError: If the expiration attempt failed.
505506 """
506507 r = requests .post (
507- self ._login_uri ("/oauth/token/expire " ),
508+ self ._login_uri ("/oauth/revoke " ),
508509 data = {
510+ "token_type_hint" : "access_token" ,
509511 "client_id" : self .client_id ,
510512 "client_secret" : self .client_secret ,
511513 "token" : token ,
You can’t perform that action at this time.
0 commit comments