You are here

function LingotekOAuthServer::__construct in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.4 lib/oauth-php/library/LingotekOAuthServer.php \LingotekOAuthServer::__construct()
  2. 7.5 lib/oauth-php/library/LingotekOAuthServer.php \LingotekOAuthServer::__construct()
  3. 7.6 lib/oauth-php/library/LingotekOAuthServer.php \LingotekOAuthServer::__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 LingotekOAuthRequestVerifier::__construct

File

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

Class

LingotekOAuthServer

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'];
  }
}