nevermined_sdk_py.data_store.auth_tokens module

class nevermined_sdk_py.data_store.auth_tokens.AuthTokensStorage(storage_path)

Bases: common_utils_py.data_store.storage_base.StorageBase

AUTH_TOKENS_TABLE = 'auth_tokens'
read_token(address)

Retrieve stored signed token for the given ethereum address

Parameters

address – hex str the ethereum address that signed the token

Returns

tuple (signed_token, created_at)

update_token(address, signed_token, created_at)

Update/replace the stored signed token for the given ethereum address

Parameters
  • address – hex str the ethereum address that signed the token

  • signed_token – hex str the signed token

  • created_at – date-time of token creation

write_token(address, signed_token, created_at)

Store signed token for session management.

Parameters
  • address – hex str the ethereum address that signed the token

  • signed_token – hex str the signed token

  • created_at – date-time of token creation