Проблемы со Steam OpenID с использованием openid4java: "Ошибка прямой проверки подписи"

Я пытаюсь получить "вход через Steam", работая над приложением Grails для школьного проекта. Я использую библиотеку openid4java. Мне трудно заставить все это работать, но я думаю, что я близок.

Я основал свою реализацию на этом примере кода: Steam OpenID Authentication в Java. Моя реализация почти идентична, однако моя версия "webthread.java" просто помещается в контроллер Grails.

Я получаю ошибку:

OpenID Verification failed for: http://steamcommunity.com/openid/id/... reason: Direct signature verification failed.
//Where ... is my steam community id.

Вот все выходные данные отладки, когда я пытался сделать один вход:

2018-03-14 16:28:34.514 DEBUG --- [nio-8443-exec-5] org.openid4java.util.OpenID4JavaUtils    : Resource /openid4java.properties not found.
    2018-03-14 16:28:34.524 DEBUG --- [nio-8443-exec-5] o.o.discovery.yadis.YadisResolver        : discovery.yadis.html.parser:org.openid4java.discovery.yadis.CyberNekoDOMYadisHtmlParser
    2018-03-14 16:28:34.537 DEBUG --- [nio-8443-exec-5] o.o.discovery.yadis.YadisResolver        : discovery.xrds.parser:org.openid4java.discovery.xrds.XrdsParserImpl
    2018-03-14 16:28:34.694 DEBUG --- [nio-8443-exec-5] o.o.discovery.html.HtmlResolver          : discovery.html.parser:org.openid4java.discovery.html.CyberNekoDOMHtmlParser
    2018-03-14 16:28:34.838 DEBUG --- [nio-8443-exec-5] org.openid4java.discovery.Discovery      : discovery.xri.resolver:org.openid4java.discovery.xri.XriDotNetProxyResolver
    2018-03-14 16:28:34.922 DEBUG --- [nio-8443-exec-5] o.o.d.xri.XriDotNetProxyResolver         : discovery.xrds.parser:org.openid4java.discovery.xrds.XrdsParserImpl
    2018-03-14 16:28:34.952  WARN --- [nio-8443-exec-5] org.openid4java.server.RealmVerifier     : RP discovery / realm validation disabled; 
    2018-03-14 16:28:34.976  INFO --- [nio-8443-exec-5] o.openid4java.consumer.ConsumerManager   : Associations disabled.
    2018-03-14 16:28:34.982 DEBUG --- [nio-8443-exec-5] org.openid4java.discovery.Discovery      : Creating URL identifier for: http://steamcommunity.com/openid
    2018-03-14 16:28:34.990 DEBUG --- [nio-8443-exec-5] org.openid4java.discovery.UrlIdentifier  : Normalized: http://steamcommunity.com/openid to: http://steamcommunity.com/openid
    2018-03-14 16:28:34.993  INFO --- [nio-8443-exec-5] org.openid4java.discovery.Discovery      : Starting discovery on URL identifier: http://steamcommunity.com/openid
    2018-03-14 16:28:35.016 DEBUG --- [nio-8443-exec-5] o.o.discovery.yadis.YadisResolver        : Performing HTTP HEAD on: http://steamcommunity.com/openid ...
    2018-03-14 16:28:35.825 DEBUG --- [nio-8443-exec-5] o.o.discovery.yadis.YadisResolver        : Performing HTTP GET on: http://steamcommunity.com/openid ...
    2018-03-14 16:28:36.058 DEBUG --- [nio-8443-exec-5] org.openid4java.util.HttpCache           : Read 289 bytes.
    2018-03-14 16:28:36.062 DEBUG --- [nio-8443-exec-5] o.o.discovery.xrds.XrdsParserImpl        : Parsing XRDS input for service types: [http://openid.net/signon/1.1, http://specs.openid.net/auth/2.0/signon, http://openid.net/signon/1.0, http://specs.openid.net/auth/2.0/server]
    2018-03-14 16:28:36.063 DEBUG --- [nio-8443-exec-5] o.o.discovery.xrds.XrdsParserImpl        : Parsing XRDS input: <?xml version="1.0" encoding="UTF-8"?>
    <xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
        <XRD>
            <Service priority="0">
                <Type>http://specs.openid.net/auth/2.0/server</Type>        
                <URI>https://steamcommunity.com/openid/login</URI>
            </Service>
        </XRD>
    </xrds:XRDS>
    2018-03-14 16:28:36.633 DEBUG --- [nio-8443-exec-5] o.o.discovery.xrds.XrdsParserImpl        : Found 1 services for the requested types.
    2018-03-14 16:28:36.639 DEBUG --- [nio-8443-exec-5] o.o.discovery.xrds.XrdsParserImpl        : Discovered endpoint: 
    Service priority: 0
    Type: [http://specs.openid.net/auth/2.0/server]
    URI: https://steamcommunity.com/openid/login
    URI Priority: -1
    LocalID: null
    2018-03-14 16:28:36.642 DEBUG --- [nio-8443-exec-5] o.o.discovery.yadis.YadisResult          : Setting X-XRDS-Location for yadis result: http://steamcommunity.com/openid
    2018-03-14 16:28:36.646  INFO --- [nio-8443-exec-5] o.o.discovery.yadis.YadisResolver        : Yadis discovered 1 endpoints from: http://steamcommunity.com/openid
    2018-03-14 16:28:36.650  INFO --- [nio-8443-exec-5] org.openid4java.discovery.Discovery      : Discovered 1 OpenID endpoints.
    2018-03-14 16:28:36.657  WARN --- [nio-8443-exec-5] o.openid4java.consumer.ConsumerManager   : Association failed; using first entry: https://steamcommunity.com/openid/login
    2018-03-14 16:28:44.825  INFO --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Creating authentication request for OP-endpoint: https://steamcommunity.com/openid/login claimedID: http://specs.openid.net/auth/2.0/identifier_select OP-specific ID: http://specs.openid.net/auth/2.0/identifier_select
    2018-03-14 16:28:44.850 DEBUG --- [nio-8443-exec-9] org.openid4java.message.ParameterList    : Created empty parameter list.
    2018-03-14 16:28:44.854 DEBUG --- [nio-8443-exec-9] org.openid4java.server.RealmVerifier     : Verifying realm: https://localhost:8443/user/signInCallBack on return URL: https://localhost:8443/user/signInCallBack
    2018-03-14 16:28:44.856  INFO --- [nio-8443-exec-9] org.openid4java.server.RealmVerifier     : Return URL: https://localhost:8443/user/signInCallBack matches realm: https://localhost:8443/user/signInCallBack
    2018-03-14 16:28:44.857 DEBUG --- [nio-8443-exec-9] org.openid4java.message.AuthRequest      : Created auth request:
    openid.ns:http://specs.openid.net/auth/2.0
    openid.claimed_id:http://specs.openid.net/auth/2.0/identifier_select
    openid.identity:http://specs.openid.net/auth/2.0/identifier_select
    openid.return_to:https://localhost:8443/user/signInCallBack
    openid.realm:https://localhost:8443/user/signInCallBack
    openid.mode:checkid_setup

    2018-03-14 16:30:42.420 DEBUG --- [nio-8443-exec-9] org.openid4java.message.ParameterList    : Creating parameter list:
    openid.ns:http://specs.openid.net/auth/2.0
    openid.mode:id_res
    openid.op_endpoint:https://steamcommunity.com/openid/login
    openid.claimed_id:http://steamcommunity.com/openid/id/...
    openid.identity:http://steamcommunity.com/openid/id/...
    openid.return_to:https://localhost:8443/user/signInCallBack
    openid.response_nonce:2018-03-14T22:30:43ZbeKDX5nve2ZqN0qHDwGUztMgtC4
    openid.assoc_handle:1234567890
    openid.signed:signed,op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_handle
    openid.sig:VBgvrHjXi2i/2ZpDBsrEZWMdMys

    2018-03-14 16:30:42.425  INFO --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Verifying authentication response...
    2018-03-14 16:30:42.426 DEBUG --- [nio-8443-exec-9] org.openid4java.message.ParameterList    : Created empty parameter list.
    2018-03-14 16:30:42.431 DEBUG --- [nio-8443-exec-9] org.openid4java.util.InternetDateFormat  : Parsed 2018-03-14T22:30:43Z into Data object: Wed Mar 14 16:30:43 CST 2018
    2018-03-14 16:30:42.432 DEBUG --- [nio-8443-exec-9] org.openid4java.message.AuthSuccess      : Created positive auth response:
    openid.ns:http://specs.openid.net/auth/2.0
    openid.mode:id_res
    openid.op_endpoint:https://steamcommunity.com/openid/login
    openid.claimed_id:http://steamcommunity.com/openid/id/...
    openid.identity:http://steamcommunity.com/openid/id/...
    openid.return_to:https://localhost:8443/user/signInCallBack
    openid.response_nonce:2018-03-14T22:30:43ZbeKDX5nve2ZqN0qHDwGUztMgtC4
    openid.assoc_handle:1234567890
    openid.signed:signed,op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_handle
    openid.sig:VBgvrHjXi2i/2ZpDBsrEZWMdMys

    2018-03-14 16:30:42.433  INFO --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Received positive auth response.
    2018-03-14 16:30:42.433 DEBUG --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Verifying return URL; receiving: https://localhost:8443/user/signInCallBack
    message: https://localhost:8443/user/signInCallBack
    2018-03-14 16:30:42.434 DEBUG --- [nio-8443-exec-9] org.openid4java.discovery.Discovery      : Creating URL identifier for: http://steamcommunity.com/openid/id/...
    2018-03-14 16:30:42.434 DEBUG --- [nio-8443-exec-9] org.openid4java.discovery.UrlIdentifier  : Normalized: http://steamcommunity.com/openid/id/... to: http://steamcommunity.com/openid/id/...
    2018-03-14 16:30:42.434 DEBUG --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Verifying discovered information for OpenID2 assertion about ClaimedID: http://steamcommunity.com/openid/id/...
    2018-03-14 16:30:42.435 DEBUG --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Performing discovery on the ClaimedID in the assertion: http://steamcommunity.com/openid/id/...
    2018-03-14 16:30:42.435  INFO --- [nio-8443-exec-9] org.openid4java.discovery.Discovery      : Starting discovery on URL identifier: http://steamcommunity.com/openid/id/...
    2018-03-14 16:30:42.435 DEBUG --- [nio-8443-exec-9] o.o.discovery.yadis.YadisResolver        : Performing HTTP HEAD on: http://steamcommunity.com/openid/id/... ...
    2018-03-14 16:30:42.624 DEBUG --- [nio-8443-exec-9] o.o.discovery.yadis.YadisResolver        : Performing HTTP GET on: http://steamcommunity.com/openid/id/... ...
    2018-03-14 16:30:42.816 DEBUG --- [nio-8443-exec-9] org.openid4java.util.HttpCache           : Read 289 bytes.
    2018-03-14 16:30:42.817 DEBUG --- [nio-8443-exec-9] o.o.discovery.xrds.XrdsParserImpl        : Parsing XRDS input for service types: [http://openid.net/signon/1.1, http://specs.openid.net/auth/2.0/signon, http://openid.net/signon/1.0, http://specs.openid.net/auth/2.0/server]
    2018-03-14 16:30:42.818 DEBUG --- [nio-8443-exec-9] o.o.discovery.xrds.XrdsParserImpl        : Parsing XRDS input: <?xml version="1.0" encoding="UTF-8"?>
    <xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
        <XRD>
            <Service priority="0">
                <Type>http://specs.openid.net/auth/2.0/signon</Type>        
                <URI>https://steamcommunity.com/openid/login</URI>
            </Service>
        </XRD>
    </xrds:XRDS>
    2018-03-14 16:30:42.872 DEBUG --- [nio-8443-exec-9] o.o.discovery.xrds.XrdsParserImpl        : Found 1 services for the requested types.
    2018-03-14 16:30:42.874 DEBUG --- [nio-8443-exec-9] o.o.discovery.xrds.XrdsParserImpl        : Discovered endpoint: 
    Service priority: 0
    Type: [http://specs.openid.net/auth/2.0/signon]
    URI: https://steamcommunity.com/openid/login
    URI Priority: -1
    LocalID: null
    2018-03-14 16:30:42.874 DEBUG --- [nio-8443-exec-9] o.o.discovery.yadis.YadisResult          : Setting X-XRDS-Location for yadis result: http://steamcommunity.com/openid/id/...
    2018-03-14 16:30:42.875  INFO --- [nio-8443-exec-9] o.o.discovery.yadis.YadisResolver        : Yadis discovered 1 endpoints from: http://steamcommunity.com/openid/id/...
    2018-03-14 16:30:42.875 DEBUG --- [nio-8443-exec-9] org.openid4java.discovery.UrlIdentifier  : Normalized: http://steamcommunity.com/openid/id/... to: http://steamcommunity.com/openid/id/...
    2018-03-14 16:30:42.876  INFO --- [nio-8443-exec-9] org.openid4java.discovery.Discovery      : Discovered 1 OpenID endpoints.
    2018-03-14 16:30:42.876 DEBUG --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Looking for a service element to match the ClaimedID and OP endpoint in the assertion...
    2018-03-14 16:30:42.876 DEBUG --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Found matching service: OpenID2
    OP-endpoint:https://steamcommunity.com/openid/login
    ClaimedID:http://steamcommunity.com/openid/id/...
    Delegate:null
    2018-03-14 16:30:42.877 DEBUG --- [nio-8443-exec-9] o.o.consumer.AbstractNonceVerifier       : Verifying nonce: 2018-03-14T22:30:43ZbeKDX5nve2ZqN0qHDwGUztMgtC4
    2018-03-14 16:30:42.878 DEBUG --- [nio-8443-exec-9] org.openid4java.util.InternetDateFormat  : Parsed 2018-03-14T22:30:43ZbeKDX5nve2ZqN0qHDwGUztMgtC4 into Data object: Wed Mar 14 16:30:43 CST 2018
    2018-03-14 16:30:42.878 DEBUG --- [nio-8443-exec-9] o.o.consumer.InMemoryNonceVerifier       : Nonce verified: 2018-03-14T22:30:43ZbeKDX5nve2ZqN0qHDwGUztMgtC4
    2018-03-14 16:30:42.879 DEBUG --- [nio-8443-exec-9] org.openid4java.discovery.Discovery      : Creating URL identifier for: http://steamcommunity.com/openid/id/...
    2018-03-14 16:30:42.879 DEBUG --- [nio-8443-exec-9] org.openid4java.discovery.UrlIdentifier  : Normalized: http://steamcommunity.com/openid/id/... to: http://steamcommunity.com/openid/id/...
    2018-03-14 16:30:42.879  INFO --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : No association found, contacting the OP for direct verification...
    2018-03-14 16:30:42.884 DEBUG --- [nio-8443-exec-9] org.openid4java.message.ParameterList    : Creating parameter list:
    openid.ns:http://specs.openid.net/auth/2.0
    openid.mode:id_res
    openid.op_endpoint:https://steamcommunity.com/openid/login
    openid.claimed_id:http://steamcommunity.com/openid/id/...
    openid.identity:http://steamcommunity.com/openid/id/...
    openid.return_to:https://localhost:8443/user/signInCallBack
    openid.response_nonce:2018-03-14T22:30:43ZbeKDX5nve2ZqN0qHDwGUztMgtC4
    openid.assoc_handle:1234567890
    openid.signed:signed,op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_handle
    openid.sig:VBgvrHjXi2i/2ZpDBsrEZWMdMys

    2018-03-14 16:30:42.885 DEBUG --- [nio-8443-exec-9] org.openid4java.message.ParameterList    : Created empty parameter list.
    2018-03-14 16:30:42.885 DEBUG --- [nio-8443-exec-9] org.openid4java.message.VerifyRequest    : Delegating verification request validity check to auth response...
    2018-03-14 16:30:42.886 DEBUG --- [nio-8443-exec-9] org.openid4java.util.InternetDateFormat  : Parsed 2018-03-14T22:30:43Z into Data object: Wed Mar 14 16:30:43 CST 2018
    2018-03-14 16:30:42.887 DEBUG --- [nio-8443-exec-9] org.openid4java.message.VerifyRequest    : Created verification request from a positive auth response:
    openid.ns:http://specs.openid.net/auth/2.0
    openid.mode:check_authentication
    openid.op_endpoint:https://steamcommunity.com/openid/login
    openid.claimed_id:http://steamcommunity.com/openid/id/...
    openid.identity:http://steamcommunity.com/openid/id/...
    openid.return_to:https://localhost:8443/user/signInCallBack
    openid.response_nonce:2018-03-14T22:30:43ZbeKDX5nve2ZqN0qHDwGUztMgtC4
    openid.assoc_handle:1234567890
    openid.signed:signed,op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_handle
    openid.sig:VBgvrHjXi2i/2ZpDBsrEZWMdMys

    2018-03-14 16:30:42.887 DEBUG --- [nio-8443-exec-9] org.openid4java.message.ParameterList    : Created empty parameter list.
    2018-03-14 16:30:42.888 DEBUG --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Performing HTTP POST on https://steamcommunity.com/openid/login
    2018-03-14 16:30:42.907 DEBUG --- [nio-8443-exec-9] org.openid4java.util.HttpCache           : Performing HTTP POST on https://steamcommunity.com/openid/login
    2018-03-14 16:30:43.975 DEBUG --- [nio-8443-exec-9] org.openid4java.util.HttpCache           : Read 51 bytes.
    2018-03-14 16:30:43.976 DEBUG --- [nio-8443-exec-9] org.openid4java.message.ParameterList    : Creating parameter list from key-value form:
    ns:http://specs.openid.net/auth/2.0
    is_valid:false

    2018-03-14 16:30:43.976 DEBUG --- [nio-8443-exec-9] org.openid4java.message.ParameterList    : Created empty parameter list.
    2018-03-14 16:30:43.976 DEBUG --- [nio-8443-exec-9] org.openid4java.message.ParameterList    : Copying parameter list:
    ns:http://specs.openid.net/auth/2.0
    is_valid:false

    2018-03-14 16:30:43.977 DEBUG --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Retrived response:
    ns:http://specs.openid.net/auth/2.0
    is_valid:false

    2018-03-14 16:30:43.982 DEBUG --- [nio-8443-exec-9] org.openid4java.message.ParameterList    : Created empty parameter list.
    2018-03-14 16:30:43.982 DEBUG --- [nio-8443-exec-9] org.openid4java.message.VerifyResponse   : Created verification response:
    ns:http://specs.openid.net/auth/2.0
    is_valid:false

    2018-03-14 16:30:43.983 DEBUG --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Direct signature verification failed with OP: https://steamcommunity.com/openid/login
    2018-03-14 16:30:43.986 ERROR --- [nio-8443-exec-9] o.openid4java.consumer.ConsumerManager   : Verification failed for: http://steamcommunity.com/openid/id/... reason: Direct signature verification failed.

0 ответов

Другие вопросы по тегам