Belle II Software  release-08-01-10
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 121 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  token 
)
Construct from a token

Definition at line 124 of file __init__.py.

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

Member Function Documentation

◆ __call__()

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

Definition at line 129 of file __init__.py.


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