public function resolve(IRequest $request)
    {
        foreach ($this->grantTypes as $grantType) {
            if ($grantType->match($request)) {
                return $grantType;
            }
        }

        throw new UnsupportedGrantTypeException;
    }