fkooman\OAuth\Client\Context::getScope PHP Method

getScope() public method

public getScope ( )
    public function getScope()
    {
        return $this->scope;
    }

Usage Example

Exemplo n.º 1
0
 public function getRefreshToken($clientConfigId, Context $context)
 {
     $stmt = $this->db->prepare("SELECT * FROM refresh_tokens WHERE client_config_id = :client_config_id AND user_id = :user_id AND scope = :scope");
     $stmt->bindValue(":client_config_id", $clientConfigId, PDO::PARAM_STR);
     $stmt->bindValue(":user_id", $context->getUserId(), PDO::PARAM_STR);
     $stmt->bindValue(":scope", $context->getScope()->isEmptyScope() ? null : $context->getScope()->getScopeAsString(), PDO::PARAM_STR);
     $stmt->execute();
     $result = $stmt->fetch(PDO::FETCH_ASSOC);
     if (false !== $result) {
         $result['scope'] = new Scope($result['scope']);
         return new RefreshToken($result);
     }
     return false;
 }
All Usage Examples Of fkooman\OAuth\Client\Context::getScope