unitelabs.sdk.client.auth

Classes

  • OAuth2

    Bases
    httpx.Auth

    Methods

    • __init__(
        self,
        endpoint : str,
        client_id : str,
        client_secret : str,
        scope : str
      ) -> None

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        endpoint
        Type
        str
        Default
        Description

      • Name
        client_id
        Type
        str
        Default
        Description

      • Name
        client_secret
        Type
        str
        Default
        Description

      • Name
        scope
        Type
        str
        Default
        = 'openid'
        Description

    • sync_auth_flow(self, request : httpx.Request) -> typing.Generator[httpx.Request, httpx.Response, None]

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        request
        Type
        httpx.Request
        Default
        Description

      Response

      Type
      typing.Generator[httpx.Request, httpx.Response, None]
      Description

    • async_auth_flow(self, request : httpx.Request) -> typing.AsyncGenerator[httpx.Request, httpx.Response]

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        request
        Type
        httpx.Request
        Default
        Description

      Response

      Type
      typing.AsyncGenerator[httpx.Request, httpx.Response]
      Description

    • build_token_request(self) -> httpx.Request

      Response

      Type
      httpx.Request
      Description

    • update_tokens(self, response : httpx.Response) -> None

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        response
        Type
        httpx.Response
        Default
        Description

    Attributes

    • Name
      endpoint
      Type
      Value

      = endpoint

      Description

    • Name
      client_id
      Type
      Value

      = client_id

      Description

    • Name
      client_secret
      Type
      Value

      = client_secret

      Description

    • Name
      scope
      Type
      Value

      = scope

      Description

    • Name
      _access_token
      Type
      str[]
      Value

      = None

      Description

    • Name
      _expires
      Type
      int[]
      Value

      = None

      Description

    • Name
      access_token
      Type
      str[]
      Value

      = None

      Description

Copyright © 2024