libretime/legacy/application/common/interface/OAuth2.php

31 lines
666 B
PHP
Raw Permalink Normal View History

<?php
2021-10-11 16:10:47 +02:00
interface OAuth2
{
/**
2021-10-11 16:10:47 +02:00
* Check whether an OAuth access token exists.
*
* @return bool true if an access token exists, otherwise false
*/
public function hasAccessToken();
/**
2021-10-11 16:10:47 +02:00
* Get the OAuth authorization URL.
*
* @return string the authorization URL
*/
public function getAuthorizeUrl();
/**
2021-10-11 16:10:47 +02:00
* Request a new OAuth access token and store it in CcPref.
*
* @param $code string exchange authorization code for access token
*/
public function requestNewAccessToken($code);
/**
2021-10-11 16:10:47 +02:00
* Regenerate the OAuth access token.
*/
public function accessTokenRefresh();
2021-10-11 16:10:47 +02:00
}