def METHOD_NAME(
    ctx,
    api_token_authorization_url,
    api_token,
    auth_type,
    client_id,
    client_secret,
    oauth2_discovery_url,
    oauth2_exchange_url,
):
    if auth_type == LoginTypes.CREDENTIALS.value:
        try:
            auth = Authentication(
                client_id=client_id,
                client_secret=client_secret,
                auth_discovery_url=oauth2_discovery_url,
                authorization_url=oauth2_exchange_url,
                auth_type=auth_type,
                cache_locally=True,
            )
            auth.authenticate()
            click.echo("Login Successful")
        except VDKInvalidAuthParamError:
            click.echo(
                f"Login type: {auth_type} requires arguments:, --client-secret, --client-id, "
                "--oauth2-exchange-url, --oauth2-discovery-url"
            )
            sys.exit(1)
        except VDKAuthException as e:
            click.echo(f"Login failed. Error was: {e.message}")
            sys.exit(1)
    elif auth_type == LoginTypes.API_TOKEN.value:
        api_token = cli_utils.get_or_prompt("Oauth2 API token", api_token)
        if not api_token:
            raise VDKException(
                what="Login failed",
                why=f"Login type: {auth_type} requires API token",
                consequence=f"Previous login will be used if still valid, "
                f"otherwise operation that require authorization will fail.",
                countermeasure="Please login providing correct API Token. ",
            )
        else:
            apikey_auth = Authentication(
                authorization_url=api_token_authorization_url,
                token=api_token,
                auth_type=auth_type,
                cache_locally=True,
            )
            try:
                apikey_auth.authenticate()
            except VDKAuthException as e:
                click.echo(f"Login failed. Error was: {e.message}")
                sys.exit(1)
            click.echo("Login Successful")
    else:
        click.echo(f"Login type: {auth_type} not supported")