Ejemplo n.º 1
0
 /**
  * addGrantType
  *
  * @param grantType - OAuth2\GrantTypeInterface
  * the grant type to add for the specified identifier
  * @param identifier - string
  * a string passed in as "grant_type" in the response that will call this grantType
  */
 public function addGrantType(HTTP_OAuth2_GrantType_GrantTypeInterface $grantType, $identifier = null)
 {
     if (is_null($identifier) || is_numeric($identifier)) {
         $identifier = $grantType->getQuerystringIdentifier();
     }
     $this->grantTypes[$identifier] = $grantType;
 }
Ejemplo n.º 2
0
 public function addGrantType(HTTP_OAuth2_GrantType_GrantTypeInterface $grantType, $key = null)
 {
     if (is_string($key)) {
         $this->grantTypes[$key] = $grantType;
     } else {
         $this->grantTypes[$grantType->getQuerystringIdentifier()] = $grantType;
     }
     // persist added grant type down to TokenController
     if (!is_null($this->tokenController)) {
         $this->getTokenController()->addGrantType($grantType);
     }
 }