oauth2_client/fetcher.py
def fetch_token(app):
    """
    Obtain a token from auth provider, using a fetcher specific to application's grant type.

    Args:
        app (oauth2_client.models.Application): app instance you need a token for

    Returns:
        oauth2_client.models.AccessToken: obtained token
    """
    fetcher_grant_dispatcher = {
        Application.GRANT_CLIENT_CREDENTIALS: ClientCredentialsFetcher,
        Application.GRANT_JWT_BEARER: JWTFetcher,
    }
    fetcher = fetcher_grant_dispatcher[app.authorization_grant_type](app)
    return fetcher.fetch_token()

    Obtain a token from auth provider, using a fetcher specific to application's grant type.

    Args:
        app (oauth2_client.models.Application): app instance you need a token for

    Returns:
        oauth2_client.models.AccessToken: obtained token
    
Obtain a token from auth provider, using a fetcher specific to application's grant type.
Obtain a token from auth provider using a fetcher specific to application ' s grant type .
def fetch_token(app):
    fetcher_grant_dispatcher = {
        Application.GRANT_CLIENT_CREDENTIALS: ClientCredentialsFetcher,
        Application.GRANT_JWT_BEARER: JWTFetcher,
    }
    fetcher = fetcher_grant_dispatcher[app.authorization_grant_type](app)
    return fetcher.fetch_token()
def fetch_token ( app ) : fetcher_grant_dispatcher = { Application . GRANT_CLIENT_CREDENTIALS : ClientCredentialsFetcher , Application . GRANT_JWT_BEARER : JWTFetcher , } fetcher = fetcher_grant_dispatcher [ app . authorization_grant_type ] ( app ) return fetcher . fetch_token ( )
Obtain a token from auth provider, using a fetcher specific to application's grant type.
Obtain a token from auth provider using a fetcher specific to application ' s grant type .
"""
    Obtain a token from auth provider, using a fetcher specific to application's grant type.

    Args:
        app (oauth2_client.models.Application): app instance you need a token for

    Returns:
        oauth2_client.models.AccessToken: obtained token
    """
None
oauth2_client.models.AccessToken
app
app instance you need a token for
app instance you need a token for