mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-16 10:18:55 +05:30
Cleanup
Signed-off-by: Alex Bilbie <alex@alexbilbie.com>
This commit is contained in:
parent
5c13c3ee54
commit
ec191cffe1
@ -2,32 +2,19 @@
|
||||
|
||||
namespace Oauth2\Client;
|
||||
|
||||
/**
|
||||
* OAuth2 Token
|
||||
*
|
||||
* @package OAuth2
|
||||
* @category Token
|
||||
* @author Phil Sturgeon
|
||||
* @copyright (c) 2011 HappyNinjas Ltd
|
||||
*/
|
||||
|
||||
abstract class Token
|
||||
{
|
||||
|
||||
/**
|
||||
* Create a new token object.
|
||||
*
|
||||
* $token = OAuth2_Token::factory($name);
|
||||
*
|
||||
* @param string token type
|
||||
* @param array token options
|
||||
* @return Token
|
||||
*/
|
||||
public static function factory($name = 'access', array $options = null)
|
||||
{
|
||||
$name = ucfirst(strtolower($name));
|
||||
|
||||
include_once 'Token/'.$name.'.php';
|
||||
include_once 'Token/'.ucfirst(strtolower($name)).'.php';
|
||||
|
||||
$class = $name.'Token';
|
||||
|
||||
@ -37,9 +24,6 @@ abstract class Token
|
||||
/**
|
||||
* Return the value of any protected class variable.
|
||||
*
|
||||
* // Get the token secret
|
||||
* $secret = $token->secret;
|
||||
*
|
||||
* @param string variable name
|
||||
* @return mixed
|
||||
*/
|
||||
@ -51,9 +35,6 @@ abstract class Token
|
||||
/**
|
||||
* Return a boolean if the property is set
|
||||
*
|
||||
* // Get the token secret
|
||||
* if ($token->secret) exit('YAY SECRET');
|
||||
*
|
||||
* @param string variable name
|
||||
* @return bool
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user