Exemple #1
0
 public function addGrantType(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);
     }
 }
 /**
  * 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(GrantTypeInterface $grantType, $identifier = null)
 {
     if (is_null($identifier) || is_numeric($identifier)) {
         $identifier = $grantType->getQuerystringIdentifier();
     }
     $this->grantTypes[$identifier] = $grantType;
 }
Exemple #3
0
 public function addGrantType(GrantTypeInterface $grantType, $identifier = null)
 {
     if (!is_string($identifier)) {
         $identifier = $grantType->getQuerystringIdentifier();
     }
     $this->grantTypes[$identifier] = $grantType;
     // persist added grant type down to TokenController
     if (!is_null($this->tokenController)) {
         $this->getTokenController()->addGrantType($grantType, $identifier);
     }
 }