Package oauth2client :: Module multistore_file
[hide private]
[frames] | no frames]

Module multistore_file

source code

Multi-credential file store with lock support.

This module implements a JSON credential store where multiple
credentials can be stored in one file.  That file supports locking
both in a single process and across processes.

The credential themselves are keyed off of:
* client_id
* user_agent
* scope

The format of the stored data is like so:
{
  'file_version': 1,
  'data': [
    {
      'key': {
        'clientId': '<client id>',
        'userAgent': '<user agent>',
        'scope': '<scope>'
      },
      'credential': {
        # JSON serialized Credentials.
      }
    }
  ]
}


Author: jbeda@google.com (Joe Beda)

Classes [hide private]
  Error
Base error for this module.
  NewerCredentialStoreError
The credential store is a newer version that supported.
  _MultiStore
A file backed store for multiple credentials.
Variables [hide private]
  logger = logging.getLogger(__name__)
  _multistores = {}
  _multistores_lock = threading.Lock()
  __package__ = 'oauth2client'