コード例 #1
0
ファイル: MockOP.py プロジェクト: anjuthomas/oiccli
    def authorization(self, request, **kwargs):
        areq = AuthorizationRequest().from_urlencoded(request)

        if not areq.verify():
            raise OicMsgError()

        resp = HTTPResponse('OK')
        return resp
コード例 #2
0
 def test_verify(self):
     query = 'redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fauthz' \
             '&response_type=code&client_id=0123456789'
     ar = AuthorizationRequest().deserialize(query, "urlencoded")
     assert ar.verify()
コード例 #3
0
 def test_urlencoded_missing_required(self):
     ar = AuthorizationRequest(response_type=["code"])
     with pytest.raises(MissingRequiredAttribute):
         ar.verify()