public function __construct(EntityManager $em) { $this->storage = new OAuth2Storage($em); parent::__construct($this->storage, ['www_realm' => 'NovoSGA']); $this->addGrantType(new ClientCredentials($this->storage)); $this->addGrantType(new AuthorizationCode($this->storage)); $this->addGrantType(new RefreshToken($this->storage, ['always_issue_new_refresh_token' => true])); $this->addGrantType(new UserCredentials($this->storage)); $this->em = $em; }
public function __construct($storage = array(), array $config = array(), array $grantTypes = array(), array $responseTypes = array(), TokenTypeInterface $tokenType = null, ScopeInterface $scopeUtil = null, ClientAssertionTypeInterface $clientAssertionType = null) { parent::__construct($storage, $config, $grantTypes, $responseTypes, $tokenType, $scopeUtil, $clientAssertionType); }
public function __construct(Module $module, $storage = array(), array $config = array(), array $grantTypes = array(), array $responseTypes = array(), \OAuth2\TokenType\TokenTypeInterface $tokenType = null, \OAuth2\ScopeInterface $scopeUtil = null, \OAuth2\ClientAssertionType\ClientAssertionTypeInterface $clientAssertionType = null) { $this->module = $module; parent::__construct($storage, $config, $grantTypes, $responseTypes, $tokenType, $scopeUtil, $clientAssertionType); }
/** * Constructor * * @param bdApi_Model_OAuth2 $model */ public function __construct(bdApi_Model_OAuth2 $model) { $storage = new bdApi_OAuth2_Storage($model); parent::__construct(array('access_token' => $storage, 'authorization_code' => $storage, 'client_credentials' => $storage, 'user_credentials' => $storage, 'refresh_token' => $storage), array('auth_code_lifetime' => bdApi_Option::get('authCodeTTL'), 'access_lifetime' => bdApi_Option::get('tokenTTL'), 'refresh_token_lifetime' => bdApi_Option::get('refreshTokenTTLDays') * 86400, 'token_param_name' => 'oauth_token', 'enforce_state' => false, 'require_exact_redirect_uri' => false, 'allow_implicit' => true, 'always_issue_new_refresh_token' => true)); $this->_model = $model; }