mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
Config options
This commit is contained in:
parent
e1c375f617
commit
9eacbdc77e
@ -11,6 +11,14 @@ class OAuthServerException extends Exception {}
|
|||||||
class Server
|
class Server
|
||||||
{
|
{
|
||||||
private $db = NULL;
|
private $db = NULL;
|
||||||
|
|
||||||
|
private $config = array(
|
||||||
|
'response_types' => array(
|
||||||
|
'code'
|
||||||
|
),
|
||||||
|
'scope_delimeter' => ','
|
||||||
|
);
|
||||||
|
|
||||||
protected $errors = array(
|
protected $errors = array(
|
||||||
'invalid_request' => 'The request is missing a required parameter, includes an invalid parameter value,
|
'invalid_request' => 'The request is missing a required parameter, includes an invalid parameter value,
|
||||||
includes a parameter more than once, or is otherwise malformed.',
|
includes a parameter more than once, or is otherwise malformed.',
|
||||||
@ -26,6 +34,11 @@ class Server
|
|||||||
);
|
);
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
public function __construct(array $options)
|
||||||
|
{
|
||||||
|
$this->options = array_merge($this->config, $options);
|
||||||
|
}
|
||||||
|
|
||||||
public function registerDbAbstractor(object $db)
|
public function registerDbAbstractor(object $db)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user