예제 #1
0
def test_id_token():
    idt = IdToken(
        **{
            "sub": "553df2bcf909104751cfd8b2",
            "aud": ["5542958437706128204e0000", "554295ce3770612820620000"],
            "auth_time": 1441364872,
            "azp": "554295ce3770612820620000",
            "at_hash": "L4Ign7TCAD_EppRbHAuCyw",
            "iat": 1441367116,
            "exp": 1441374316,
            "iss": "https://sso.qa.7pass.ctf.prosiebensat1.com"
        })

    idt.verify()
예제 #2
0
def test_id_token():
    idt = IdToken(**{
        "sub": "553df2bcf909104751cfd8b2",
        "aud": [
            "5542958437706128204e0000",
            "554295ce3770612820620000"
        ],
        "auth_time": 1441364872,
        "azp": "554295ce3770612820620000",
        "at_hash": "L4Ign7TCAD_EppRbHAuCyw",
        "iat": 1441367116,
        "exp": 1441374316,
        "iss": "https://sso.qa.7pass.ctf.prosiebensat1.com"
    })

    idt.verify()
예제 #3
0
def test_id_token():
    _now = time_util.utc_time_sans_frac()

    idt = IdToken(
        **{
            "sub": "553df2bcf909104751cfd8b2",
            "aud": ["5542958437706128204e0000", "554295ce3770612820620000"],
            "auth_time": 1441364872,
            "azp": "554295ce3770612820620000",
            "at_hash": "L4Ign7TCAD_EppRbHAuCyw",
            "iat": _now,
            "exp": _now + 3600,
            "iss": "https://sso.qa.7pass.ctf.prosiebensat1.com",
        })

    idt.verify()
예제 #4
0
    def test_verify_iat_in_future_expired(self):
        now = time_util.utc_time_sans_frac()

        idt = IdToken(
            **{
                "sub": "553df2bcf909104751cfd8b2",
                "aud":
                ["5542958437706128204e0000", "554295ce3770612820620000"],
                "auth_time": 1441364872,
                "azp": "554295ce3770612820620000",
                "at_hash": "L4Ign7TCAD_EppRbHAuCyw",
                "iat": now + 3600,
                "exp": now,
                "iss": "https://sso.qa.7pass.ctf.prosiebensat1.com",
            })

        with pytest.raises(EXPError):
            idt.verify(skew=7200)