SasToken Class

Shared Access Signature Token used to authenticate a request

Parameters: uri (str): URI of the resource to be accessed key_name (str): Shared Access Key Name key (str): Shared Access Key (base64 encoded) ttl (int)[default 3600]: Time to live for the token, in seconds

Data Attributes: expiry_time (int): Time that token will expire (in UTC, since epoch) ttl (int): Time to live for the token, in seconds

Raises: SasTokenError if trying to build a SasToken from invalid values

Inheritance
builtins.object
SasToken

Constructor

SasToken(uri, key, key_name=None, ttl=3600)

Parameters

Name Description
uri
Required
key
Required
key_name
Default value: None
ttl
Default value: 3600

Methods

refresh

Refresh the SasToken lifespan, giving it a new expiry time

refresh

Refresh the SasToken lifespan, giving it a new expiry time

refresh()