def test_parse_refresh_session_request(self):
        rsreq = RefreshSessionRequest(id_token="id_token",
                                      redirect_url="http://example.com/authz",
                                      state="state0")
        uencq = rsreq.to_urlencoded()

        request = self.srv.parse_refresh_session_request(query=uencq)
        assert isinstance(request, RefreshSessionRequest)
        assert _eq(request.keys(), ['id_token', 'state', 'redirect_url'])
        assert request["id_token"] == "id_token"

        url = "https://example.org/userinfo?{}".format(uencq)
        request = self.srv.parse_refresh_session_request(url=url)
        assert isinstance(request, RefreshSessionRequest)
        assert _eq(request.keys(), ['id_token', 'state', 'redirect_url'])
        assert request["id_token"] == "id_token"
예제 #2
0
    def test_parse_refresh_session_request(self):
        rsreq = RefreshSessionRequest(id_token="id_token",
                                      redirect_url="http://example.com/authz",
                                      state="state0")
        uencq = rsreq.to_urlencoded()

        request = self.srv.parse_refresh_session_request(query=uencq)
        assert isinstance(request, RefreshSessionRequest)
        assert _eq(request.keys(), ["id_token", "state", "redirect_url"])
        assert request["id_token"] == "id_token"

        url = "https://example.org/userinfo?{}".format(uencq)
        request = self.srv.parse_refresh_session_request(url=url)
        assert isinstance(request, RefreshSessionRequest)
        assert _eq(request.keys(), ["id_token", "state", "redirect_url"])
        assert request["id_token"] == "id_token"
예제 #3
0
                            redirect_uri="http://example.com/authz",
                            scope=["openid"],
                            state="state0",
                            nonce="N0nce")

UIREQ = UserInfoRequest(access_token="access_token")

REGREQ = RegistrationRequest(contacts=["*****@*****.**"],
                             redirect_uris=["http://example.org/jqauthz"],
                             application_name="pacubar",
                             client_id=CLIENT_ID,
                             operation="register",
                             application_type="web")

RSREQ = RefreshSessionRequest(id_token="id_token",
                              redirect_url="http://example.com/authz",
                              state="state0")

#key, type, usage, owner="."

alg = "HS256"
ktype = alg2keytype(alg)
keys = KC_SYM_S.get(ktype)
CSREQ = CheckSessionRequest(
    id_token=IDTOKEN.to_jwt(key=keys, algorithm="HS256"))

ESREQ = EndSessionRequest(id_token=IDTOKEN.to_jwt(key=keys, algorithm="HS256"),
                          redirect_url="http://example.org/jqauthz",
                          state="state0")

UINFO = Claims(name={"essential": True},
예제 #4
0
파일: __init__.py 프로젝트: ghedin/pyoidc
    def parse_refresh_session_request(self, url=None, query=None):
        if url:
            parts = urlparse.urlparse(url)
            scheme, netloc, path, params, query, fragment = parts[:6]

        return RefreshSessionRequest().from_urlencoded(query)