pyrestsdk.middleware.authorizationhandler package — PyRESTSDK documentation

# pyrestsdk.middleware.authorizationhandler package

## Module contents

Authorization Handlers

class pyrestsdk.middleware.authorizationhandler.BasicAuthorizationHandler(credential: T, **kwargs)

  Bases: `BaseAuthorizationHandler`

  Basic Authoziation Handler Type

  credential: T
  send(request: PreparedRequest, stream: bool = False, timeout: float | Tuple[float, float] | Tuple[float, None] | None = None, verify: bool = True, cert: bytes | str | Tuple[bytes | str, bytes | str] | None = None, proxies: Mapping[str, str] | None = None) → Response

    Makes a network request if next is none, otherwise requests the next middleware to do so

    Args:

      request (PreparedRequest): The network request

    Returns:

      Response: Response from network request

class pyrestsdk.middleware.authorizationhandler.KerboseAuthorizationHandler(credential: T, **kwargs)

  Bases: `BaseAuthorizationHandler`

  Kerbose Authorization Handler Type

  credential: T
  send(request: PreparedRequest, stream: bool = False, timeout: float | Tuple[float, float] | Tuple[float, None] | None = None, verify: bool = True, cert: bytes | str | Tuple[bytes | str, bytes | str] | None = None, proxies: Mapping[str, str] | None = None) → Response

    Makes a network request if next is none, otherwise requests the next middleware to do so

    Args:

      request (PreparedRequest): The network request

    Returns:

      Response: Response from network request

class pyrestsdk.middleware.authorizationhandler.TokenAuthorizationHandler(credential: T, **kwargs)

  Bases: `BaseAuthorizationHandler`

  Token Authorization Handler Type

  credential: T
  send(request: PreparedRequest, stream: bool = False, timeout: float | Tuple[float, float] | Tuple[float, None] | None = None, verify: bool = True, cert: bytes | str | Tuple[bytes | str, bytes | str] | None = None, proxies: Mapping[str, str] | None = None) → Response

    Makes a network request if next is none, otherwise requests the next middleware to do so

    Args:

      request (PreparedRequest): The network request

    Returns:

      Response: Response from network request