コード例 #1
0
 public function access($code, $options = array())
 {
     if ($code === null) {
         throw new Exception(array('message' => 'Expected Authorization Code from ' . ucfirst($this->name) . ' is missing'));
     }
     return parent::access($code, $options);
 }
コード例 #2
0
 public function callback()
 {
     try {
         // Load the provider
         $this->provider = Provider::make($this->provider, $this->config);
         return $this->provider->access(\Input::get('code'));
     } catch (OAuth2_Exception $e) {
         throw new Exception($e->getMessage());
     }
 }
コード例 #3
0
 public function __construct(array $options = array())
 {
     // Now make sure we have the default scope to get user data
     $options['scope'] = array_merge(array('basic'), (array) array_get($options, 'scope', array()));
     parent::__construct($options);
 }