Part of lp.services.authserver.interfaces View In Hierarchy
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 . |
Parameters | name | The username to look up. |
Returns | A dictionary {id: person-id, username: person-name, keys: [(key-type, key-text)]}, or NoSuchPersonWithName if there is no person with the given name. |
issuer_name
for context
.Parameters | issuer_name | An IMacaroonIssuer name. Only issuers where
issuable_via_authserver is True are permitted. |
context_type | A string identifying the type of context for which to issue the macaroon. Currently only 'LibraryFileAlias' and 'SnapBuild' are supported. | |
context | The 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. | |
Returns | A serialised macaroon or a fault. |
macaroon_raw
grants access to context
.Parameters | macaroon_raw | A serialised macaroon. |
context_type | A string identifying the type of context to check. Currently only 'LibraryFileAlias' and 'SnapBuild' are supported. | |
context | The 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. | |
Returns | True if the macaroon grants access to context , otherwise
an Unauthorized fault. |