Skip to content

Commit 01611a0

Browse files
author
Stephane Landelle
committed
Back SpnegoEngine thread safety fix from AsyncHttpClient#95, close AsyncHttpClient#94
1 parent f4abc37 commit 01611a0

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,6 @@ public class SpnegoEngine {
6262

6363
private final SpnegoTokenGenerator spnegoGenerator;
6464

65-
private GSSContext gssContext = null;
66-
67-
/**
68-
* base64 decoded challenge *
69-
*/
70-
private byte[] token;
71-
72-
private Oid negotiationOid = null;
73-
7465
public SpnegoEngine(final SpnegoTokenGenerator spnegoGenerator) {
7566
this.spnegoGenerator = spnegoGenerator;
7667
}
@@ -97,6 +88,10 @@ public String generateToken(String server) throws Throwable {
9788
* Unfortunately SPNEGO is JRE >=1.6.
9889
*/
9990

91+
GSSContext gssContext = null;
92+
byte[] token = null; // base64 decoded challenge
93+
Oid negotiationOid = null;
94+
10095
/** Try SPNEGO by default, fall back to Kerberos later if error */
10196
negotiationOid = new Oid(SPNEGO_OID);
10297

0 commit comments

Comments
 (0)