1: | <?php |
2: | namespace Worldline\Acquiring\Sdk\Authentication; |
3: | |
4: | /** |
5: | * Class OAuth2TokenCache |
6: | * |
7: | * @package Worldline\Acquiring\Sdk\Authentication |
8: | */ |
9: | interface OAuth2TokenCache |
10: | { |
11: | /** |
12: | * @param string $tokenType The token type that was derived from the URI path. |
13: | * @return string|null The currently cached OAuth2 access token, or null if not set or expired. |
14: | */ |
15: | public function getOAuth2AccessToken(string $tokenType); |
16: | |
17: | /** |
18: | * @param string $tokenType The tokenType that was derived from the uriPath |
19: | * @param string $oauth2AccessToken The OAuth2 access token to store. |
20: | * @param int $expirationTimestamp The timestamp the OAuth2 access token expires, as a number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). |
21: | */ |
22: | public function storeOAuth2AccessToken($tokenType, $oauth2AccessToken, $expirationTimestamp); |
23: | } |
24: |