aboutsummaryrefslogtreecommitdiffstats
path: root/library/oauth2/src/OAuth2/Storage/RefreshTokenInterface.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-07-03 21:33:24 +0200
committerMario Vavti <mario@mariovavti.com>2017-07-03 21:33:24 +0200
commitd0961068247ce57ba0eb45afc078cacb44b87810 (patch)
treef9372689e943a522f4c0bd417d4458474aee0cfd /library/oauth2/src/OAuth2/Storage/RefreshTokenInterface.php
parent562124c29f821b046bc4cf4b48a7bde39c70a07b (diff)
parent64cad0a041e44940f75bf351fc3755b3202f9029 (diff)
downloadvolse-hubzilla-d0961068247ce57ba0eb45afc078cacb44b87810.tar.gz
volse-hubzilla-d0961068247ce57ba0eb45afc078cacb44b87810.tar.bz2
volse-hubzilla-d0961068247ce57ba0eb45afc078cacb44b87810.zip
merge red into hubzilla
Diffstat (limited to 'library/oauth2/src/OAuth2/Storage/RefreshTokenInterface.php')
-rw-r--r--library/oauth2/src/OAuth2/Storage/RefreshTokenInterface.php82
1 files changed, 0 insertions, 82 deletions
diff --git a/library/oauth2/src/OAuth2/Storage/RefreshTokenInterface.php b/library/oauth2/src/OAuth2/Storage/RefreshTokenInterface.php
deleted file mode 100644
index 0273f2125..000000000
--- a/library/oauth2/src/OAuth2/Storage/RefreshTokenInterface.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-
-namespace OAuth2\Storage;
-
-/**
- * Implement this interface to specify where the OAuth2 Server
- * should get/save refresh tokens for the "Refresh Token"
- * grant type
- *
- * @author Brent Shaffer <bshafs at gmail dot com>
- */
-interface RefreshTokenInterface
-{
- /**
- * Grant refresh access tokens.
- *
- * Retrieve the stored data for the given refresh token.
- *
- * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN.
- *
- * @param $refresh_token
- * Refresh token to be check with.
- *
- * @return
- * An associative array as below, and NULL if the refresh_token is
- * invalid:
- * - refresh_token: Refresh token identifier.
- * - client_id: Client identifier.
- * - user_id: User identifier.
- * - expires: Expiration unix timestamp, or 0 if the token doesn't expire.
- * - scope: (optional) Scope values in space-separated string.
- *
- * @see http://tools.ietf.org/html/rfc6749#section-6
- *
- * @ingroup oauth2_section_6
- */
- public function getRefreshToken($refresh_token);
-
- /**
- * Take the provided refresh token values and store them somewhere.
- *
- * This function should be the storage counterpart to getRefreshToken().
- *
- * If storage fails for some reason, we're not currently checking for
- * any sort of success/failure, so you should bail out of the script
- * and provide a descriptive fail message.
- *
- * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN.
- *
- * @param $refresh_token
- * Refresh token to be stored.
- * @param $client_id
- * Client identifier to be stored.
- * @param $user_id
- * User identifier to be stored.
- * @param $expires
- * Expiration timestamp to be stored. 0 if the token doesn't expire.
- * @param $scope
- * (optional) Scopes to be stored in space-separated string.
- *
- * @ingroup oauth2_section_6
- */
- public function setRefreshToken($refresh_token, $client_id, $user_id, $expires, $scope = null);
-
- /**
- * Expire a used refresh token.
- *
- * This is not explicitly required in the spec, but is almost implied.
- * After granting a new refresh token, the old one is no longer useful and
- * so should be forcibly expired in the data store so it can't be used again.
- *
- * If storage fails for some reason, we're not currently checking for
- * any sort of success/failure, so you should bail out of the script
- * and provide a descriptive fail message.
- *
- * @param $refresh_token
- * Refresh token to be expirse.
- *
- * @ingroup oauth2_section_6
- */
- public function unsetRefreshToken($refresh_token);
-}