src/Support/Carpenter.php
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;
    }
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;
    }
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 ; }
Choose an Auth Method for the Bridge.

@param Bridge $bridge
@param string $username
@param string $authMethod

@return Bridge
Choose an Auth Method for the Bridge .