Skip to content

Commit 4099709

Browse files
committed
Add revokeToken method for revoking access tokens
1 parent 82b33dc commit 4099709

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Api/Authentication.php

+14
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,18 @@ public function refreshToken($refreshToken)
5858
'client_secret' => $this->getClientSecret(),
5959
]);
6060
}
61+
62+
/**
63+
* Revoke an access token
64+
*
65+
* @param string $accessToken
66+
* @return array|json
67+
*/
68+
public function revokeToken($accessToken)
69+
{
70+
return $this->post('oauth2/revoke', [
71+
'client_id' => $this->getClientId(),
72+
'token' => $accessToken,
73+
]);
74+
}
6175
}

0 commit comments

Comments
 (0)