pyrit.auth.Authenticator#

class Authenticator[source]#

Bases: ABC

Abstract base class for authenticators.

__init__()#

Methods

__init__()

get_token()

Get the current authentication token synchronously.

get_token_async()

Get the current authentication token asynchronously.

refresh_token()

Refresh the authentication token synchronously.

refresh_token_async()

Refresh the authentication token asynchronously.

Attributes

get_token() str[source]#

Get the current authentication token synchronously.

Returns:

The current authentication token.

Return type:

str

async get_token_async() str[source]#

Get the current authentication token asynchronously.

Returns:

The current authentication token.

Return type:

str

refresh_token() str[source]#

Refresh the authentication token synchronously.

Returns:

The refreshed authentication token.

Return type:

str

async refresh_token_async() str[source]#

Refresh the authentication token asynchronously.

Returns:

The refreshed authentication token.

Return type:

str

token: str#