We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SO returns
"The openid.return_to parameter... does not match the actual URL ",
Switching all http to https in the StackExchangeClient.siteLogin seems to solve this problem
http
https
StackExchangeClient.siteLogin
private void siteLogin(String host) throws IOException { Response response = httpClient.get("https://" + host + "/users/login?returnurl=" + URLEncoder.encode("https://" + host + "/", "UTF-8"), cookies); String fkey = response.parse().select("input[name='fkey']").val(); response = httpClient.post("https://" + host + "/users/authenticate", cookies, "fkey", fkey, "openid_identifier", openIdProvider); Document document = response.parse(); // confirmation prompt? if (response.url().toString().startsWith("https://openid.stackexchange.com/account/prompt")) { LOGGER.trace("Confirmation prompt \n" + document.html()); String session = document.select("input[name='session']").first().val(); fkey = document.select("input[name='fkey']").first().val(); Response promptResponse = httpClient.post("https://openid.stackexchange.com/account/prompt/submit", cookies, "session", session, "fkey", fkey); document = promptResponse.parse(); LOGGER.trace("Confirmation prompt response \n" + document.html()); } // when the account doesn't exist on this site, confirm its creation if (!document.select("form[action='/users/openidconfirm']").isEmpty()) { LOGGER.debug("Account doesn't exist on target site '{}', confirming new account", host); String session = document.select("input[name='s']").first().val(); fkey = document.select("input[name='fkey']").first().val(); Response newAccountResponse = httpClient.post("https://" + host + "/users/openidconfirm", cookies, "s", session, "fkey", fkey); LOGGER.trace("New account confirmation response \n" + newAccountResponse.parse().html()); } // check logged in Response checkResponse = httpClient.get("https://" + host + "/users/current", cookies); if (checkResponse.parse().getElementsByClass("js-inbox-button").first() == null) { LOGGER.debug(response.parse().html()); throw new IllegalStateException("Unable to login to Stack Exchange."); } }
The text was updated successfully, but these errors were encountered:
Darned Stack Overflow, changing all the thingz and breakin' me codez!
I'll take a look at this (probably in 6 to 8) and release version 1.1.0 with the fix.
Sorry, something went wrong.
e78de30
No branches or pull requests
SO returns
Switching all
http
tohttps
in theStackExchangeClient.siteLogin
seems to solve this problemThe text was updated successfully, but these errors were encountered: