Utils

class commercetools.utils.BaseTokenSaver

Bases: object

add_token(client_id, scopes, token)
get_token(client_id, scopes)
class commercetools.utils.DefaultTokenSaver

Bases: commercetools.utils.BaseTokenSaver

add_token(client_id, scopes, token)
classmethod clear_cache()
get_token(client_id, scopes)
storage
commercetools.utils.fix_token_url(token_url)

Ensure the token url has the right format.

Often clients only pass the base url instead of the complete token url, which gets confusing for users.

Return type:str