Esempio n. 1
0
 public function setup(ezcMvcRequest $request)
 {
     // Setup for testing credentials
     // Check for required components (fail if not present)
     // Fail if too many components are required (according to spec, later)
     // Validate components
     $token = ezpOauthUtility::getToken($request);
     $cred = new ezcAuthenticationIdCredentials($token);
     $oauthFilter = new ezpOauthFilter();
     $auth = new ezcAuthentication($cred);
     $auth->addFilter($oauthFilter);
     return $auth;
 }
Esempio n. 2
0
 public function setup(ezcMvcRequest $request)
 {
     // Setup for testing credentials
     // Check for required components (fail if not present)
     // Fail if too many components are required (according to spec, later)
     // Validate components
     $logger = ezcLog::getInstance();
     $logger->source = __FUNCTION__;
     $logger->category = "oauth";
     $logger->log("Begin oauth verification", ezcLog::DEBUG);
     $token = ezpOauthUtility::getToken($request);
     $cred = new ezcAuthenticationIdCredentials($token);
     $oauthFilter = new ezpOauthFilter();
     $auth = new ezcAuthentication($cred);
     $auth->addFilter($oauthFilter);
     return $auth;
 }