Esempio n. 1
0
def getUnSignerObject(signObj):
    signer = Signer()
    matched = decoded = False
    key = not_allowed
    subscription = None
    try:
        unsignedObj = signer.unsign_object(signObj)
        decoded = True
    except Exception as ex:
        decoded = False

    if decoded == True:
        key = unsignedObj[field_names.key]
        subcription_object = lookup.check_subscriber(secret_key=key)
        subscription = subcription_object[field_names.object]
        matched = unsignedObj[field_names.app_code] == app_code
    return {
        field_names.key: key,
        field_names.matched: matched,
        field_names.subscription: subscription
    }
Esempio n. 2
0
def getUnsigned(signkey):
    signer = Signer()
    return signer.unsign_object(signkey)