Part of lp.services.macaroons.model View In Hierarchy
Known subclasses: lp.code.model.codeimportjob.CodeImportJobMacaroonIssuer, lp.code.model.gitrepository.GitRepositoryMacaroonIssuer, lp.code.xmlrpc.tests.test_git.DummyMacaroonIssuer, lp.services.authserver.tests.test_authserver.DummyMacaroonIssuer, lp.snappy.model.snapbuild.SnapBuildMacaroonIssuer, lp.soyuz.model.binarypackagebuild.BinaryPackageBuildMacaroonIssuer
IMacaroonIssuer.| Method | identifier | See IMacaroonIssuer. |
| Method | checkIssuingContext | Check that the issuing context is suitable. |
| Method | issueMacaroon | See IMacaroonIssuer. |
| Method | checkVerificationContext | Check that the verification context is suitable. |
| Method | verifyPrimaryCaveat | Verify the primary context caveat on one of this issuer's macaroons. |
| Method | verifyMacaroon | See IMacaroonIssuer. |
| Method | _primary_caveat_name | The name of the primary context caveat issued by this issuer. |
| Method | _root_secret | Undocumented |
Concrete implementations may implement this method to check that the context of a macaroon issuance is suitable. The returned context is used to create the primary caveat, and may be the same context that was passed in or an adapted one.
| Parameters | context | The context to check. |
| kwargs | Additional arguments that issuers may require to issue a macaroon. | |
| Returns | The context to use to create the primary caveat. | |
| Raises | BadMacaroonContext | if the context is unsuitable. |
IMacaroonIssuer.Concrete implementations may implement this method to check that the context of a macaroon verification is suitable. The returned context is passed to individual caveat checkers, and may be the same context that was passed in or an adapted one.
| Parameters | context | The context to check. |
| kwargs | Additional arguments that issuers may require to verify a macaroon. | |
| Returns | The context to pass to individual caveat checkers. | |
| Raises | BadMacaroonContext | if the context is unsuitable. |
| Parameters | verified | An IMacaroonVerificationResult. Implementations
of this method may update this with additional information
resulting from the verification process. |
| caveat_value | The text of the caveat with the caveat name removed. | |
| context | The context to check. | |
| kwargs | Additional arguments that issuers may require to verify a macaroon. | |
| Returns | True if this caveat is allowed, otherwise False. | |
IMacaroonIssuer.