You are here

function OAuthServer::__construct in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 7.3 lib/oauth-php/library/OAuthServer.php \OAuthServer::__construct()

* Construct the request to be verified * *

Parameters

string request: * @param string method * @param array params The request parameters * @param string store The session storage class. * @param array store_options The session storage class parameters. * @param array options Extra options: * - allowed_uri_schemes: list of allowed uri schemes. * - disallowed_uri_schemes: list of unallowed uri schemes. * * e.g. Allow only http and https * $options = array( * 'allowed_uri_schemes' => array('http', 'https'), * 'disallowed_uri_schemes' => array() * ); * * e.g. Disallow callto, mailto and file, allow everything else * $options = array( * 'allowed_uri_schemes' => array(), * 'disallowed_uri_schemes' => array('callto', 'mailto', 'file') * ); * * e.g. Allow everything * $options = array( * 'allowed_uri_schemes' => array(), * 'disallowed_uri_schemes' => array() * ); *

Overrides OAuthRequestVerifier::__construct

File

lib/oauth-php/library/OAuthServer.php, line 83

Class

OAuthServer

Code

function __construct($uri = null, $method = null, $params = null, $store = 'SESSION', $store_options = array(), $options = array()) {
  parent::__construct($uri, $method, $params);
  $this->session = OAuthSession::instance($store, $store_options);
  if (array_key_exists('allowed_uri_schemes', $options) && is_array($options['allowed_uri_schemes'])) {
    $this->allowed_uri_schemes = $options['allowed_uri_schemes'];
  }
  if (array_key_exists('disallowed_uri_schemes', $options) && is_array($options['disallowed_uri_schemes'])) {
    $this->disallowed_uri_schemes = $options['disallowed_uri_schemes'];
  }
}