JanRain: python-openid : fromSuccessResponse()

hdknr@ubuntu-vbox:~/python-openid-2.2.4/openid$ find . -name "*.py" -exec grep -H fromSuccessResponse {} \;
./test/test_pape_draft2.py:    def test_fromSuccessResponse(self):
./test/test_pape_draft2.py:        req = pape.Response.fromSuccessResponse(oid_req)
./test/test_pape_draft2.py:    def test_fromSuccessResponseNoSignedArgs(self):
./test/test_pape_draft2.py:        resp = pape.Response.fromSuccessResponse(oid_req)
./test/test_ax.py:    def test_fromSuccessResponseWithoutExtension(self):
./test/test_ax.py:        r = ax.FetchResponse.fromSuccessResponse(oreq)
./test/test_ax.py:    def test_fromSuccessResponseWithoutData(self):
./test/test_ax.py:        r = ax.FetchResponse.fromSuccessResponse(oreq)
./test/test_ax.py:    def test_fromSuccessResponseWithData(self):
./test/test_ax.py:        ax_resp = ax.FetchResponse.fromSuccessResponse(resp)
./test/test_sreg.py:    def test_fromSuccessResponse_signed(self):
./test/test_sreg.py:        sreg_resp = sreg.SRegResponse.fromSuccessResponse(success_resp)
./test/test_sreg.py:    def test_fromSuccessResponse_unsigned(self):
./test/test_sreg.py:        sreg_resp = sreg.SRegResponse.fromSuccessResponse(success_resp,
./test/test_pape_draft5.py:    def test_fromSuccessResponse(self):
./test/test_pape_draft5.py:        req = pape.Response.fromSuccessResponse(oid_req)
./test/test_pape_draft5.py:    def test_fromSuccessResponseNoSignedArgs(self):
./test/test_pape_draft5.py:        resp = pape.Response.fromSuccessResponse(oid_req)
./extensions/draft/pape2.py:    def fromSuccessResponse(cls, success_response):
./extensions/draft/pape2.py:    fromSuccessResponse = classmethod(fromSuccessResponse)
./extensions/draft/pape5.py:    def fromSuccessResponse(cls, success_response):
./extensions/draft/pape5.py:    fromSuccessResponse = classmethod(fromSuccessResponse)
./extensions/ax.py:    def fromSuccessResponse(cls, success_response, signed=True):
./extensions/ax.py:    fromSuccessResponse = classmethod(fromSuccessResponse)
./extensions/sreg.py:  3. The relying party uses C{L{SRegResponse.fromSuccessResponse}} to
./extensions/sreg.py:      sreg_resp = SRegResponse.fromSuccessResponse(success_response)
./extensions/sreg.py:    @group Consumer: fromSuccessResponse
./extensions/sreg.py:    def fromSuccessResponse(cls, success_response, signed_only=True):
./extensions/sreg.py:    fromSuccessResponse = classmethod(fromSuccessResponse)

 

hdknr@ubuntu-vbox:~/python-openid-2.2.4/openid$ vi extensions/ax.py

class FetchResponse(AXKeyValueMessage):

    def fromSuccessResponse(cls, success_response, signed=True):
        """Construct a FetchResponse object from an OpenID library
        SuccessResponse object.

        @param success_response: A successful id_res response object
        @type success_response: openid.consumer.consumer.SuccessResponse

        @param signed: Whether non-signed args should be
            processsed. If True (the default), only signed arguments
            will be processsed.
        @type signed: bool

        @returns: A FetchResponse containing the data from the OpenID
            message, or None if the SuccessResponse did not contain AX
            extension data.

        @raises AXError: when the AX data cannot be parsed.
        """
        self = cls()
        ax_args = success_response.extensionResponse(self.ns_uri, signed)

        try:
            self.parseExtensionArgs(ax_args)
        except NotAXMessage, err:
            return None
        else:
            return self

    fromSuccessResponse = classmethod(fromSuccessResponse)

カテゴリー: 未分類 パーマリンク

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中