From 37d61d0415f6cc96a7a9abe057e1ae0f89fd977e Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 6 Nov 2017 10:04:48 +0000 Subject: Import py-macaroon-bakery_0.0.5.orig.tar.gz --- macaroonbakery/checkers/__init__.py | 54 +++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 11 deletions(-) (limited to 'macaroonbakery/checkers/__init__.py') diff --git a/macaroonbakery/checkers/__init__.py b/macaroonbakery/checkers/__init__.py index 9f0b022..25c6b7d 100644 --- a/macaroonbakery/checkers/__init__.py +++ b/macaroonbakery/checkers/__init__.py @@ -1,24 +1,53 @@ # Copyright 2017 Canonical Ltd. # Licensed under the LGPLv3, see LICENCE file for details. from macaroonbakery.checkers.conditions import ( - STD_NAMESPACE, COND_DECLARED, COND_TIME_BEFORE, COND_ERROR, COND_ALLOW, - COND_DENY, COND_NEED_DECLARED + STD_NAMESPACE, + COND_DECLARED, + COND_TIME_BEFORE, + COND_ERROR, + COND_ALLOW, + COND_DENY, + COND_NEED_DECLARED, ) from macaroonbakery.checkers.caveat import ( - allow_caveat, deny_caveat, declared_caveat, parse_caveat, - time_before_caveat, Caveat + allow_caveat, + deny_caveat, + declared_caveat, + parse_caveat, + time_before_caveat, + Caveat, ) from macaroonbakery.checkers.declared import ( - context_with_declared, infer_declared, infer_declared_from_conditions, - need_declared_caveat + context_with_declared, + infer_declared, + infer_declared_from_conditions, + need_declared_caveat, +) +from macaroonbakery.checkers.operation import ( + context_with_operations, +) +from macaroonbakery.checkers.namespace import ( + Namespace, + deserialize_namespace +) +from macaroonbakery.checkers.time import ( + context_with_clock, + expiry_time, + macaroons_expiry_time, ) -from macaroonbakery.checkers.operation import context_with_operations -from macaroonbakery.checkers.namespace import Namespace, deserialize_namespace -from macaroonbakery.checkers.time import context_with_clock from macaroonbakery.checkers.checkers import ( - Checker, CheckerInfo, RegisterError + Checker, + CheckerInfo, + RegisterError, +) +from macaroonbakery.checkers.auth_context import ( + AuthContext, + ContextKey, +) + +from macaroonbakery.checkers.utils import ( + condition_with_prefix, ) -from macaroonbakery.checkers.auth_context import AuthContext, ContextKey __all__ = [ 'AuthContext', @@ -36,14 +65,17 @@ __all__ = [ 'Namespace', 'RegisterError', 'allow_caveat', + 'condition_with_prefix', 'context_with_declared', 'context_with_operations', 'context_with_clock', 'declared_caveat', 'deny_caveat', 'deserialize_namespace', + 'expiry_time', 'infer_declared', 'infer_declared_from_conditions', + 'macaroons_expiry_time', 'need_declared_caveat', 'parse_caveat', 'time_before_caveat', -- cgit v1.2.3