gravitino.auth.auth_data_provider.AuthDataProvider

class gravitino.auth.auth_data_provider.AuthDataProvider

Bases: ABC

The provider of authentication data

__init__()

Methods

__init__()

close()

Close the resource in the provider.

get_token_data()

Acquire the data of token for authentication.

has_token_data()

Judge whether AuthDataProvider can provide token data.

abstract close()

Close the resource in the provider.

abstract get_token_data() bytes

Acquire the data of token for authentication. The client will set the token data as HTTP header Authorization directly. So the return value should ensure token data contain the token header (eg: Bearer, Basic) if necessary.

Returns:

the token data is used for authentication.

abstract has_token_data() bool

Judge whether AuthDataProvider can provide token data.

Returns:

true if the AuthDataProvider can provide token data otherwise false.