summaryrefslogtreecommitdiff
path: root/macaroonbakery/__init__.py
blob: dd2e6dfbae506497fa3f9062cbee17f405262cbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Copyright 2017 Canonical Ltd.
# Licensed under the LGPLv3, see LICENCE file for details.

from __future__ import unicode_literals
try:
    import urllib3.contrib.pyopenssl
except ImportError:
    pass
else:
    urllib3.contrib.pyopenssl.inject_into_urllib3()

from macaroonbakery.versions import (
    LATEST_BAKERY_VERSION, BAKERY_V3, BAKERY_V2, BAKERY_V1, BAKERY_V0
)
from macaroonbakery.authorizer import (
    ClosedAuthorizer, EVERYONE, AuthorizerFunc, Authorizer, ACLAuthorizer
)
from macaroonbakery.codec import (
    encode_caveat, decode_caveat, encode_uvarint
)
from macaroonbakery.checker import (
    Op, LOGIN_OP, AuthInfo, AuthChecker, Checker
)
from macaroonbakery.error import (
    ThirdPartyCaveatCheckFailed, CaveatNotRecognizedError, AuthInitError,
    PermissionDenied, IdentityError, DischargeRequiredError, VerificationError,
    ThirdPartyInfoNotFound
)
from macaroonbakery.identity import (
    Identity, ACLIdentity, SimpleIdentity, IdentityClient, NoIdentities
)
from macaroonbakery.keys import generate_key, PrivateKey, PublicKey
from macaroonbakery.store import MemoryOpsStore, MemoryKeyStore
from macaroonbakery.third_party import (
    ThirdPartyCaveatInfo, ThirdPartyInfo, legacy_namespace
)
from macaroonbakery.macaroon import (
    Macaroon, MacaroonJSONDecoder, MacaroonJSONEncoder, ThirdPartyStore,
    ThirdPartyLocator, macaroon_version
)
from macaroonbakery.discharge import (
    discharge_all, discharge, local_third_party_caveat, ThirdPartyCaveatChecker
)
from macaroonbakery.oven import Oven, canonical_ops
from macaroonbakery.bakery import Bakery


__all__ = [
    'ACLIdentity',
    'ACLAuthorizer',
    'AuthChecker',
    'AuthInfo',
    'AuthInitError',
    'Authorizer',
    'AuthorizerFunc',
    'Bakery',
    'BAKERY_V0',
    'BAKERY_V1',
    'BAKERY_V2',
    'BAKERY_V3',
    'Bakery',
    'CaveatNotRecognizedError',
    'Checker',
    'ClosedAuthorizer',
    'DischargeRequiredError',
    'EVERYONE',
    'Identity',
    'IdentityClient',
    'IdentityError',
    'LATEST_BAKERY_VERSION',
    'LOGIN_OP',
    'Macaroon',
    'MacaroonJSONDecoder',
    'MacaroonJSONEncoder',
    'MemoryKeyStore',
    'MemoryOpsStore',
    'NoIdentities',
    'Op',
    'Oven',
    'PermissionDenied',
    'PrivateKey',
    'PublicKey',
    'NoIdentities',
    'SimpleIdentity',
    'ThirdPartyCaveatCheckFailed',
    'ThirdPartyCaveatChecker',
    'ThirdPartyCaveatInfo',
    'ThirdPartyInfo',
    'ThirdPartyInfoNotFound',
    'ThirdPartyLocator',
    'ThirdPartyStore',
    'VERSION',
    'VerificationError',
    'canonical_ops',
    'decode_caveat',
    'discharge',
    'discharge_all',
    'encode_caveat',
    'encode_uvarint',
    'generate_key',
    'legacy_namespace',
    'local_third_party_caveat',
    'macaroon_version',
]