icat.authinfo — Provide the AuthenticatorInfo class¶
Note
This module is used internally in icat.config. Most users
will not need to use it directly or even care about it.
-
class
icat.authinfo.AuthenticatorInfo(authInfo)¶ Bases:
collections.abc.SequenceA wrapper around the authenticator info as returned by the ICAT server.
Parameters: authInfo ( list) – authenticator information from the ICAT server as returned byicat.client.Client.getAuthenticatorInfo().-
getAuthNames()¶ Return a list of authenticator names available at the ICAT server.
-
getCredentialKeys(auth=None, hide=None)¶ Return credential keys.
Parameters: - auth (
str) – authenticator name. If given, return only the credential keys for this authenticator. IfNone, return credential keys for all authenticators. - hide (
bool) – if given, return either only the hidden or the non-hidden credential keys, according to the provided value. IfNone, return credential keys for all authenticators.
Returns: names of credential keys.
Return type: Raises: KeyError – if auth is provided, but no authenticator by that name is defined in the authenticator information.
Changed in version 0.17.0: add default value for parameter auth.
- auth (
-
-
class
icat.authinfo.LegacyAuthenticatorInfo¶ Bases:
objectAuthenticatorInfo for old ICAT server.
This is a dummy implementation to emulate AuthenticatorInfo for the case that the server does not support the
icat.client.Client.getAuthenticatorInfo()call.-
getAuthNames()¶ Return
None.
-
getCredentialKeys(auth=None, hide=None)¶ Return credential keys.
Dummy implementation, pretent that all authenticators expect username and password as credential keys, where password is marked as hidden.
Parameters: Returns: names of credential keys.
Return type: Changed in version 0.17.0: add default value for parameter auth.
-