Belle II Software  release-08-00-04
BearerAuth Class Reference
Inheritance diagram for BearerAuth:
Collaboration diagram for BearerAuth:

Public Member Functions

def __init__ (self, token)
 
def __call__ (self, r)
 

Private Attributes

 _authtoken
 Authorization header to send with each request.
 

Detailed Description

Simple class to present bearer token instead of username/password

Definition at line 120 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  token 
)
Construct from a token

Definition at line 123 of file __init__.py.

123  def __init__(self, token):
124  """Construct from a token"""
125 
126  self._authtoken = f"Bearer {token}"
127 

Member Function Documentation

◆ __call__()

def __call__ (   self,
  r 
)
Update headers to include token

Definition at line 128 of file __init__.py.


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