Authentication

class Auth(domain='https://accounts.descarteslabs.com', scope=None, leeway=500, token_info_path='/root/.descarteslabs/token_info.json', client_id=None, client_secret=None, jwt_token=None, refresh_token=None)[source]

Helps retrieve JWT from a client id and refresh token for cli usage. :param domain: endpoint for auth0 :param scope: the JWT fields to be included :param leeway: JWT expiration leeway :param token_info_path: path to a JSON file optionally holding auth information :param client_id: JWT client id :param client_secret: JWT client secret :param jwt_token: the JWT token, if we already have one :param refresh_token: the refresh token

build_session()[source]
classmethod from_environment_or_token_json(**kwargs)[source]

Creates an Auth object from environment variables CLIENT_ID, CLIENT_SECRET, JWT_TOKEN if they are set, or else from a JSON file at the given path. :param domain: endpoint for auth0 :param scope: the JWT fields to be included :param leeway: JWT expiration leeway :param token_info_path: path to a JSON file optionally holding auth information

ADAPTER = <descarteslabs.common.threading.local.ThreadLocalWrapper object>
RETRY_CONFIG = Retry(total=5, connect=None, read=None, redirect=None, status=None)
namespace
payload
session
token