protected function chooseAuthMethodForBridge(Bridge $bridge, $username, $authMethod = null)
    {
        // Check if an auth method is passed explicitly.
        if (! is_null($authMethod) && collect(config('watson-bridge.auth_methods'))->contains($authMethod)) {
            $bridge->useAuthMethodAs($authMethod);

            // Auth method is token so we need to set Token.
            if ($authMethod == 'token') {
                $bridge->setToken($username);
            }
        }

        return $bridge;
    }