function withGrant($grantTypeName, array $overrideOptions = [])
    {
        $options = [
            'scopes'        => $this->defaultScopes,
            'client_id'     => $this->clientId,
            'client_secret' => $this->clientSecret,
        ];

        if (! empty($overrideOptions) )
            $options = array_merge($options, $overrideOptions);


        if ($grantTypeName instanceof ipGrantRequest) {
            $grant = clone $grantTypeName;
            $grant->with($grant::parseWith($options));
        } else {
            $grant = $this->plugins()->fresh($grantTypeName, $options);
        }

        return $grant;
    }