AAS HTTP Client Documentation
Loading...
Searching...
No Matches
config_classes.BearerAuth Class Reference

Bearer Authentication Configuration. More...

Inheritance diagram for config_classes.BearerAuth:
[legend]
Collaboration diagram for config_classes.BearerAuth:
[legend]

Public Member Functions

None set_token (self, str token)
 Set the bearer token for the authentication.
 
str get_token (self)
 Get the bearer token for the authentication.
 
bool is_active (self)
 Check if the bearer authentication is active.
 

Protected Attributes

 _token
 

Static Protected Attributes

str _token = PrivateAttr(default="")
 

Detailed Description

Bearer Authentication Configuration.

Parameters
BaseModelPydantic BaseModel for data validation.

Definition at line 10 of file config_classes.py.

Member Function Documentation

◆ get_token()

str config_classes.BearerAuth.get_token (   self)

Get the bearer token for the authentication.

Returns
The bearer token.

Definition at line 25 of file config_classes.py.

◆ is_active()

bool config_classes.BearerAuth.is_active (   self)

Check if the bearer authentication is active.

Returns
True if the token is not empty, False otherwise.

Definition at line 32 of file config_classes.py.

◆ set_token()

None config_classes.BearerAuth.set_token (   self,
str  token 
)

Set the bearer token for the authentication.

Parameters
tokenBearer token for the authentication.

Definition at line 18 of file config_classes.py.

Here is the caller graph for this function:

Member Data Documentation

◆ _token [1/2]

str config_classes.BearerAuth._token = PrivateAttr(default="")
staticprotected

Definition at line 12 of file config_classes.py.

◆ _token [2/2]

config_classes.BearerAuth._token
protected

Definition at line 19 of file config_classes.py.


The documentation for this class was generated from the following file: