You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: marklogic-client-api/src/main/java/com/marklogic/client/impl/okhttp/MarkLogicCloudAuthenticationConfigurer.java
+4-4
Original file line number
Diff line number
Diff line change
@@ -157,8 +157,8 @@ public TokenAuthenticationInterceptor(TokenGenerator tokenGenerator) {
Copy file name to clipboardExpand all lines: marklogic-client-api/src/test/java/com/marklogic/client/impl/okhttp/TokenAuthenticationInterceptorTest.java
+12-12
Original file line number
Diff line number
Diff line change
@@ -40,30 +40,30 @@ void beforeEach() {
40
40
}
41
41
42
42
@Test
43
-
voidreceive403() {
44
-
enqueueResponseCodes(200, 200, 403, 200);
43
+
voidreceive401() {
44
+
enqueueResponseCodes(200, 200, 401, 200);
45
45
46
46
verifyRequestReturnsResponseCode(200);
47
47
verifyRequestReturnsResponseCode(200);
48
48
verifyRequestReturnsResponseCode(200,
49
-
"If a 403 is received from the server, then the token should be renewed, and then the 200 should be " +
49
+
"If a 401 is received from the server, then the token should be renewed, and then the 200 should be " +
50
50
"returned to the caller.");
51
51
52
52
assertEquals(2, fakeTokenGenerator.timesInvoked,
53
-
"A token should have been generated for the first request and then again when the 403 was received.");
53
+
"A token should have been generated for the first request and then again when the 401 was received.");
54
54
}
55
55
56
56
@Test
57
-
voidreceive401() {
58
-
enqueueResponseCodes(200, 200, 401);
57
+
voidreceive403() {
58
+
enqueueResponseCodes(200, 200, 403);
59
59
60
60
verifyRequestReturnsResponseCode(200);
61
61
verifyRequestReturnsResponseCode(200);
62
-
verifyRequestReturnsResponseCode(401);
62
+
verifyRequestReturnsResponseCode(403);
63
63
64
64
assertEquals(1, fakeTokenGenerator.timesInvoked,
65
-
"A token should have been generated for the first request, and the 401 should not have resulted in the " +
66
-
"token being renewed; only a 403 should.");
65
+
"A token should have been generated for the first request, and the 403 should not have resulted in the " +
0 commit comments