[ Avaa Bypassed ]




Upload:

Command:

www-data@3.143.211.215: ~ $
# Copyright 2017 Canonical Ltd.
# Licensed under the LGPLv3, see LICENCE file for details.
from collections import namedtuple

import macaroonbakery.checkers as checkers


def legacy_namespace():
    ''' Standard namespace for pre-version3 macaroons.
    '''
    ns = checkers.Namespace(None)
    ns.register(checkers.STD_NAMESPACE, '')
    return ns


class ThirdPartyCaveatInfo(namedtuple(
    'ThirdPartyCaveatInfo',
    'condition, first_party_public_key, third_party_key_pair, root_key, '
        'caveat, version, id, namespace')):
    '''ThirdPartyCaveatInfo holds the information decoded from
    a third party caveat id.

    @param condition holds the third party condition to be discharged.
    This is the only field that most third party dischargers will
    need to consider. {str}

    @param first_party_public_key holds the public key of the party
    that created the third party caveat. {PublicKey}

    @param third_party_key_pair holds the nacl private used to decrypt
    the caveat - the key pair of the discharging service. {PrivateKey}

    @param root_key holds the secret root key encoded by the caveat. {bytes}

    @param caveat holds the full caveat id from
    which all the other fields are derived. {bytes}

    @param version holds the version that was used to encode
    the caveat id. {number}

    @param id holds the id of the third party caveat (the id that the
    discharge macaroon should be given). This will differ from Caveat
    when the caveat information is encoded separately. {bytes}

    @param namespace object that holds the namespace of the first party
    that created the macaroon, as encoded by the party that added the
    third party caveat. {checkers.Namespace}
    '''


class ThirdPartyInfo(namedtuple('ThirdPartyInfo', 'version, public_key')):
    ''' ThirdPartyInfo holds information on a given third party
    discharge service.
    @param version The latest bakery protocol version supported
    by the discharger {number}
    @param public_key Public key of the third party {PublicKey}
    '''

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
_internal Folder 0755
__init__.py File 2.62 KB 0644
_authorizer.py File 4.01 KB 0644
_bakery.py File 3.13 KB 0644
_checker.py File 16.33 KB 0644
_codec.py File 10.2 KB 0644
_discharge.py File 9.16 KB 0644
_error.py File 2.26 KB 0644
_identity.py File 4.05 KB 0644
_keys.py File 2.87 KB 0644
_macaroon.py File 15.18 KB 0644
_oven.py File 10.39 KB 0644
_store.py File 2.24 KB 0644
_third_party.py File 2.01 KB 0644
_versions.py File 176 B 0644