Python helper

class sift.GridspaceCapability(account_id, auth_token)

A token that encodes the permissions granted to a Gridspace relying-party Client

Parameters:
  • account_id (string) – the account id to which this token is granted access
  • auth_token (string) – the secret key used to sign the token. Note, this auth token is not visible to the user of the token.
Returns:

A new GridspaceCapability with zero permissions

allow_client_incoming(client_name)

Allow the user of this token to accept incoming connections at the given client name

Parameters:client_name (string) – Client name to accept calls from. This should be unique among all clients using capability tokens generated from a given API account
allow_client_outgoing(application_id, **kwargs)

Allow the user of this token to make outgoing connections. Keyword arguments are passed to the application.

Parameters:
  • application_id (string) – Application to contact
  • **kwargs – extra parameters that will be passed to Application
generate(expires=3600)

Generate a capability token with an expiration date.

Parameters:expires (int) – The token lifetime, in seconds. Defaults to 1 hour (3600)
payload()

Return the payload for this token.