Exemplo n.º 1
0
 /**
  * Creates an OAuth authorisation code.
  *
  * @param string $redirect_uri the redirect URI associated with the code
  * @param string|array $scope the allowed scope - this should be a subset of
  * the scope provided by the authorisation, or null if all of the authorisation's
  * scope is to be included
  * @param array $additional additional data to be stored in the code
  * @return string the authorisation code
  */
 public function issueCode($redirect_uri, $scope = null, $additional = array())
 {
     if ($scope == null) {
         $scope = $this->available_scope;
     }
     $code = Code::create($this, $redirect_uri, $scope, $additional);
     return $code->getCode();
 }