mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-26 16:52:04 +05:30
Added generateCode function
This commit is contained in:
parent
1c447e4a8e
commit
927d1dc838
@ -173,6 +173,19 @@ class Server
|
||||
return $params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a unique code
|
||||
*
|
||||
* Generate a unique code for an authorisation code, or token
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
private function generateCode()
|
||||
{
|
||||
return sha1(uniqid(microtime()));
|
||||
}
|
||||
|
||||
public function newAuthCode(string $clientId, $type = 'user',
|
||||
string $typeId, string $redirectUri, $scopes = array(),
|
||||
string $access_token = null)
|
||||
|
Loading…
Reference in New Issue
Block a user