Python helper

class sift.GridspaceCapability(account_id, auth_token)

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

  • 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.

A new GridspaceCapability with zero permissions


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.

  • application_id (string) – Application to contact
  • **kwargs – extra parameters that will be passed to Application

Generate a capability token with an expiration date.

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

Return the payload for this token.