mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-30 02:33:14 +05:30
Added generateCode function
This commit is contained in:
parent
1c447e4a8e
commit
927d1dc838
@ -173,6 +173,19 @@ class Server
|
|||||||
return $params;
|
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',
|
public function newAuthCode(string $clientId, $type = 'user',
|
||||||
string $typeId, string $redirectUri, $scopes = array(),
|
string $typeId, string $redirectUri, $scopes = array(),
|
||||||
string $access_token = null)
|
string $access_token = null)
|
||||||
|
Loading…
Reference in New Issue
Block a user