b.c.CredentialStoreRegistry(registry.Registry) : class documentation

Part of bzrlib.config View In Hierarchy

A class that registers credential stores.

A credential store provides access to credentials via the password_encoding field in authentication.conf sections.

Except for stores provided by bzr itself, most stores are expected to be provided by plugins that will therefore use register_lazy(password_encoding, module_name, member_name, help=help, fallback=fallback) to install themselves.

A fallback credential store is one that is queried if no credentials can be found via authentication.conf.

Method get_credential_store Undocumented
Method is_fallback Check if the named credentials store should be used as fallback.
Method get_fallback_credentials Request credentials from all fallback credentials stores.
Method register Register a new object to a name.
Method register_lazy Register a new credential store to be loaded on request.

Inherited from Registry:

Method __init__ Create a new Registry.
Method get Return the object register()'ed to the given key.
Method get_prefix Return an object whose key is a prefix of the supplied value.
Method get_help Get the help text associated with the given key
Method get_info Get the extra information associated with the given key
Method remove Remove a registered entry.
Method __contains__ Undocumented
Method keys Get a list of registered entries
Method iteritems Undocumented
Method items Undocumented
Method _add_help_and_info Add the help and information about this key
Method _get_module Return the module the object will be or was loaded from.
Method _get_key_or_default Return either 'key' or the default key if key is None
Method _set_default_key Undocumented
Method _get_default_key Undocumented
def get_credential_store(self, encoding=None):
Undocumented
def is_fallback(self, name):
Check if the named credentials store should be used as fallback.
def get_fallback_credentials(self, scheme, host, port=None, user=None, path=None, realm=None):
Request credentials from all fallback credentials stores.

The first credentials store that can provide credentials wins.

def register(self, key, obj, help=None, override_existing=False, fallback=False):
Register a new object to a name.
ParameterskeyThis is the key to use to request the object later.
objThe object to register.
helpHelp text for this entry. This may be a string or a callable. If it is a callable, it should take two parameters (registry, key): this registry and the key that the help was registered under.
override_existingRaise KeyErorr if False and something has already been registered for that key. If True, ignore if there is an existing key (always register the new value).
fallbackWhether this credential store should be used as fallback.
def register_lazy(self, key, module_name, member_name, help=None, override_existing=False, fallback=False):
Register a new credential store to be loaded on request.
Parametersmodule_nameThe python path to the module. Such as 'os.path'.
member_nameThe member of the module to return. If empty or None, get() will return the module itself.
helpHelp text for this entry. This may be a string or a callable.
override_existingIf True, replace the existing object with the new one. If False, if there is already something registered with the same key, raise a KeyError
fallbackWhether this credential store should be used as fallback.
API Documentation for Bazaar, generated by pydoctor at 2019-10-15 00:33:37.