l.s.a.i.IAuthServer(Interface) : interface documentation

Part of lp.services.authserver.interfaces View In Hierarchy

A storage for details about users.
Method getUserAndSSHKeys Get details about a person, including their SSH keys.
Method issueMacaroon Issue a macaroon of type issuer_name for context.
Method verifyMacaroon Verify that macaroon_raw grants access to context.
def getUserAndSSHKeys(name):
Get details about a person, including their SSH keys.
ParametersnameThe username to look up.
ReturnsA dictionary {id: person-id, username: person-name, keys: [(key-type, key-text)]}, or NoSuchPersonWithName if there is no person with the given name.
def issueMacaroon(issuer_name, context_type, context):
Issue a macaroon of type issuer_name for context.
Parametersissuer_nameAn IMacaroonIssuer name. Only issuers where issuable_via_authserver is True are permitted.
context_typeA string identifying the type of context for which to issue the macaroon. Currently only 'LibraryFileAlias' and 'SnapBuild' are supported.
contextThe context for which to issue the macaroon. Note that this is passed over XML-RPC, so it should be plain data (e.g. an ID) rather than a database object.
ReturnsA serialised macaroon or a fault.
def verifyMacaroon(macaroon_raw, context_type, context):
Verify that macaroon_raw grants access to context.
Parametersmacaroon_rawA serialised macaroon.
context_typeA string identifying the type of context to check. Currently only 'LibraryFileAlias' and 'SnapBuild' are supported.
contextThe context to check. Note that this is passed over XML-RPC, so it should be plain data (e.g. an ID) rather than a database object.
ReturnsTrue if the macaroon grants access to context, otherwise an Unauthorized fault.
API Documentation for Launchpad, generated by pydoctor at 2019-07-17 00:00:04.