diff --git a/src/oauth2server/Server.php b/src/oauth2server/Server.php index e336fcf0..836145ba 100644 --- a/src/oauth2server/Server.php +++ b/src/oauth2server/Server.php @@ -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)