@@ -37,6 +37,7 @@ public class Realm {
37
37
private final String nonce ;
38
38
private final String algorithm ;
39
39
private final String response ;
40
+ private final String opaque ;
40
41
private final String qop ;
41
42
private final String nc ;
42
43
private final String cnonce ;
@@ -71,7 +72,8 @@ private Realm(AuthScheme scheme,
71
72
String uri ,
72
73
String method ,
73
74
boolean usePreemptiveAuth ,
74
- String domain , String enc , String host , boolean messageType2Received ) {
75
+ String domain , String enc , String host , boolean messageType2Received ,
76
+ String opaque ) {
75
77
76
78
this .principal = principal ;
77
79
this .password = password ;
@@ -80,6 +82,7 @@ private Realm(AuthScheme scheme,
80
82
this .nonce = nonce ;
81
83
this .algorithm = algorithm ;
82
84
this .response = response ;
85
+ this .opaque = opaque ;
83
86
this .qop = qop ;
84
87
this .nc = nc ;
85
88
this .cnonce = cnonce ;
@@ -124,6 +127,10 @@ public String getAlgorithm() {
124
127
public String getResponse () {
125
128
return response ;
126
129
}
130
+
131
+ public String getOpaque () {
132
+ return opaque ;
133
+ }
127
134
128
135
public String getQop () {
129
136
return qop ;
@@ -261,6 +268,7 @@ public static class RealmBuilder {
261
268
private String nonce = "" ;
262
269
private String algorithm = "MD5" ;
263
270
private String response = "" ;
271
+ private String opaque = "" ;
264
272
private String qop = "auth" ;
265
273
private String nc = "00000001" ;
266
274
private String cnonce = "" ;
@@ -364,6 +372,15 @@ public RealmBuilder setResponse(String response) {
364
372
this .response = response ;
365
373
return this ;
366
374
}
375
+
376
+ public String getOpaque () {
377
+ return this .opaque ;
378
+ }
379
+
380
+ public RealmBuilder setOpaque (String opaque ) {
381
+ this .opaque = opaque ;
382
+ return this ;
383
+ }
367
384
368
385
public String getQop () {
369
386
return qop ;
@@ -414,6 +431,7 @@ public RealmBuilder parseWWWAuthenticateHeader(String headerLine) {
414
431
setRealmName (match (headerLine , "realm" ));
415
432
setNonce (match (headerLine , "nonce" ));
416
433
setAlgorithm (match (headerLine , "algorithm" ));
434
+ setOpaque (match (headerLine , "opaque" ));
417
435
setQop (match (headerLine , "qop" ));
418
436
if (getNonce () != null && !getNonce ().equalsIgnoreCase ("" )) {
419
437
setScheme (AuthScheme .DIGEST );
@@ -437,6 +455,7 @@ public RealmBuilder clone(Realm clone) {
437
455
setPassword (clone .getPassword ());
438
456
setPrincipal (clone .getPrincipal ());
439
457
setEnconding (clone .getEncoding ());
458
+ setOpaque (clone .getOpaque ());
440
459
setQop (clone .getQop ());
441
460
setScheme (clone .getScheme ());
442
461
setUri (clone .getUri ());
@@ -580,7 +599,8 @@ public Realm build() {
580
599
domain ,
581
600
enc ,
582
601
host ,
583
- messageType2Received );
602
+ messageType2Received ,
603
+ opaque );
584
604
}
585
605
}
586
606
0 commit comments