Skip to content

Commit

Permalink
KEYCLOAK-2470 Upgrade Apache HTTP Client to wildfly 10.0.0.Final alig…
Browse files Browse the repository at this point in the history
…ned version
  • Loading branch information
mposolda committed Feb 10, 2016
1 parent 6f56d00 commit eae36ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions pom.xml
Expand Up @@ -46,10 +46,8 @@
<wildfly.version>10.0.0.Final</wildfly.version>

<aesh.version>0.66.4</aesh.version>
<!--<apache.httpcomponents.version>4.5</apache.httpcomponents.version>-->
<apache.httpcomponents.version>4.3.6</apache.httpcomponents.version>
<!--<apache.httpcomponents.httpcore.version>4.4.1</apache.httpcomponents.httpcore.version> &lt;!&ndash; WILDFLY VERSION &ndash;&gt;-->
<apache.httpcomponents.httpcore.version>4.3.3</apache.httpcomponents.httpcore.version>
<apache.httpcomponents.version>4.5</apache.httpcomponents.version>
<apache.httpcomponents.httpcore.version>4.4.1</apache.httpcomponents.httpcore.version>
<apache.mime4j.version>0.6</apache.mime4j.version>
<bouncycastle.version>1.52</bouncycastle.version>
<dom4j.version>1.6.1</dom4j.version>
Expand Down
Expand Up @@ -284,7 +284,7 @@ protected Response spnegoLogin(String username, String password) {
SpnegoAuthenticator.bypassChallengeJavascript = true;
driver.navigate().to(KERBEROS_APP_URL);
String kcLoginPageLocation = driver.getCurrentUrl();
String location = "http://localhost:8081/auth/realms/test/protocol/openid-connect/auth?response_type=code&client_id=kerberos-app&redirect_uri=http%3A%2F%2Flocalhost%3A8081%2Fkerberos-portal&state=0%2F88a96ddd-84fe-4e77-8a46-02394d7b3a7d&login=true";

// Request for SPNEGO login sent with Resteasy client
spnegoSchemeFactory.setCredentials(username, password);
Response response = client.target(kcLoginPageLocation).request().get();
Expand Down
Expand Up @@ -22,6 +22,7 @@
import javax.security.auth.Subject;

import org.apache.http.auth.AuthScheme;
import org.apache.http.auth.Credentials;
import org.apache.http.impl.auth.SPNegoScheme;
import org.apache.http.impl.auth.SPNegoSchemeFactory;
import org.apache.http.params.HttpParams;
Expand Down Expand Up @@ -72,7 +73,7 @@ public KeycloakSPNegoScheme(boolean stripPort) {


@Override
protected byte[] generateGSSToken(byte[] input, Oid oid, String authServer) throws GSSException {
protected byte[] generateGSSToken(byte[] input, Oid oid, String authServer, Credentials credentials) throws GSSException {
KerberosUsernamePasswordAuthenticator authenticator = new KerberosUsernamePasswordAuthenticator(kerberosConfig);
try {
Subject clientSubject = authenticator.authenticateSubject(username, password);
Expand Down

0 comments on commit eae36ac

Please sign in to comment.