l.s.m.m.MacaroonIssuerBase : class documentation

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

See 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
@property
def identifier(self):
See IMacaroonIssuer.
@property
def _primary_caveat_name(self):
The name of the primary context caveat issued by this issuer.
@property
def _root_secret(self):
Undocumented
def checkIssuingContext(self, context, **kwargs):
Check that the issuing context is suitable.

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.

ParameterscontextThe context to check.
kwargsAdditional arguments that issuers may require to issue a macaroon.
ReturnsThe context to use to create the primary caveat.
RaisesBadMacaroonContextif the context is unsuitable.
def issueMacaroon(self, context, **kwargs):
See IMacaroonIssuer.
def checkVerificationContext(self, context, **kwargs):
Check that the verification context is suitable.

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.

ParameterscontextThe context to check.
kwargsAdditional arguments that issuers may require to verify a macaroon.
ReturnsThe context to pass to individual caveat checkers.
RaisesBadMacaroonContextif the context is unsuitable.
def verifyPrimaryCaveat(self, verified, caveat_value, context, **kwargs):
Verify the primary context caveat on one of this issuer's macaroons.
ParametersverifiedAn IMacaroonVerificationResult. Implementations of this method may update this with additional information resulting from the verification process.
caveat_valueThe text of the caveat with the caveat name removed.
contextThe context to check.
kwargsAdditional arguments that issuers may require to verify a macaroon.
ReturnsTrue if this caveat is allowed, otherwise False.
def verifyMacaroon(self, macaroon, context, require_context=True, errors=None, **kwargs):
See IMacaroonIssuer.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.