Beispiel #1
0
def test_userinfo_claims_request_5_3_1():
    userinfo_claims = {
        "userinfo": {
            "verified_claims": {
                "verification": {
                    "trust_framework": {
                        "value": "de_aml"
                    },
                    "evidence": [{
                        "type": {
                            "value": "id_document"
                        },
                        "method": {
                            "value": "pipp"
                        },
                        "document": {
                            "type": {
                                "values": ["idcard", "passport"]
                            }
                        }
                    }]
                },
                "claims": None
            }
        }
    }

    icr = IDAClaimsRequest(**userinfo_claims["userinfo"])
    icr.verify()
    assert icr
Beispiel #2
0
def test_userinfo_claims_request_5_2_1():
    verified_claims = {
        "verified_claims": {
            "verification": {
                "time": None,
                "evidence": None
            },
            "claims": None
        }
    }

    icr = IDAClaimsRequest(**verified_claims)
    icr.verify()
    assert icr
Beispiel #3
0
def test_userinfo_claims_request_5_1_1():
    userinfo_claims = {
        "userinfo": {
            "verified_claims": {
                "claims": {
                    "given_name": None,
                    "family_name": None,
                    "birthdate": None
                }
            }
        }
    }

    icr = IDAClaimsRequest(**userinfo_claims["userinfo"])
    icr.verify()
    assert isinstance(icr["verified_claims"], VerifiedClaimsRequest)
Beispiel #4
0
def test_userinfo_claims_request_5_3_2():
    userinfo_claims = {
        "userinfo": {
            "verified_claims": {
                "verification": {
                    "date": {
                        "max_age": 63113852
                    }
                },
                "claims": None
            }
        }
    }

    icr = IDAClaimsRequest(**userinfo_claims["userinfo"])
    icr.verify()
    assert icr
Beispiel #5
0
def test_userinfo_claims_request_5_2_2():
    verified_claims = {
        "verified_claims": {
            "verification": {
                "time": None,
                "evidence": [{
                    "method": None,
                    "document": None
                }]
            },
            "claims": None
        }
    }

    icr = IDAClaimsRequest(**verified_claims)
    icr.verify()
    assert icr
Beispiel #6
0
def test_userinfo_claims_request_5_1_3():
    userinfo_claims = {
        "userinfo": {
            "verified_claims": {
                "claims": {
                    "given_name": {
                        "essential": True,
                        "purpose": "To make communication look more personal"
                    },
                    "family_name": {
                        "essential": True
                    },
                    "birthdate": {
                        "purpose": "To send you best wishes on your birthday"
                    }
                }
            }
        }
    }

    icr = IDAClaimsRequest(**userinfo_claims["userinfo"])
    icr.verify()
    assert isinstance(icr["verified_claims"], VerifiedClaimsRequest)
Beispiel #7
0
def test_userinfo_claims_request_5_1_4():
    userinfo_claims = {"userinfo": {"verified_claims": {"claims": None}}}

    icr = IDAClaimsRequest(**userinfo_claims["userinfo"])
    icr.verify()
    assert isinstance(icr["verified_claims"], VerifiedClaimsRequest)