New KVV login working
This commit is contained in:
@@ -80,11 +80,11 @@ public class Login extends HTTPService {
|
||||
}
|
||||
|
||||
/*
|
||||
1= GET https://kvv.imp.fu-berlin.de/Shibboleth.sso/Login?entityID=https://identity.fu-berlin.de/idp-fub-qa
|
||||
1= GET https://kvv.imp.fu-berlin.de/Shibboleth.sso/Login?entityID=https://identity.fu-berlin.de/idp-fub
|
||||
-> Location-Header: https://identity.fu-berlin.de:9443/idp-fub-qa/profile/SAML2/Redirect/SSO?SAMLResponse=[SAMLResponse]&RelayState=[RelayState]
|
||||
*/
|
||||
private void step1(final NetworkCallback<HashMap<String, String>> callback, final NetworkErrorCallback errorCallback) {
|
||||
get("https://kvv.imp.fu-berlin.de/Shibboleth.sso/Login?entityID=https://identity.fu-berlin.de/idp-fub-qa", null, response -> {
|
||||
get("https://kvv.imp.fu-berlin.de/Shibboleth.sso/Login?entityID=https://identity.fu-berlin.de/idp-fub", null, response -> {
|
||||
String location = response.getHeaders().get("Location");
|
||||
if (location==null) {
|
||||
errorCallback.onError(new NetworkError(100111, -1, "Error on getting SAML request!"));
|
||||
@@ -126,7 +126,7 @@ public class Login extends HTTPService {
|
||||
private void step3(String JSESSIONID_FU, final NetworkCallback<Boolean> callback, final NetworkErrorCallback errorCallback) {
|
||||
HashMap<String, String> cookies = new HashMap<>();
|
||||
cookies.put("JSESSIONID", JSESSIONID_FU);
|
||||
get("https://identity.fu-berlin.de:9443/idp-fub-qa/profile/SAML2/Redirect/SSO?execution=e1s1", cookies, response -> {
|
||||
get("https://identity.fu-berlin.de/idp-fub/profile/SAML2/Redirect/SSO?execution=e1s1", cookies, response -> {
|
||||
callback.onResponse(true);
|
||||
}, error -> errorCallback.onError(new NetworkError(100130, error.networkResponse.statusCode, "Error starting login page!")));
|
||||
}
|
||||
@@ -147,7 +147,7 @@ public class Login extends HTTPService {
|
||||
body.put("j_username", username);
|
||||
body.put("j_password", password);
|
||||
body.put("_eventId_proceed", "");
|
||||
post("https://identity.fu-berlin.de:9443/idp-fub-qa/profile/SAML2/Redirect/SSO?execution=e1s1", cookies, body, response -> {
|
||||
post("https://identity.fu-berlin.de/idp-fub/profile/SAML2/Redirect/SSO?execution=e1s1", cookies, body, response -> {
|
||||
String cookies1 = response.getHeaders().get("Set-Cookie");
|
||||
if (cookies1 ==null) {
|
||||
errorCallback.onError(new NetworkError(100141, -1, "Error on logging in to FU Identity Server!"));
|
||||
|
||||
Reference in New Issue
Block a user