20
20
import java .util .Map ;
21
21
import java .util .Optional ;
22
22
23
+ import com .fasterxml .jackson .core .JsonProcessingException ;
24
+ import com .fasterxml .jackson .core .type .TypeReference ;
25
+ import com .fasterxml .jackson .databind .JsonMappingException ;
26
+ import com .fasterxml .jackson .databind .ObjectMapper ;
23
27
import okhttp3 .HttpUrl ;
24
28
import okhttp3 .mockwebserver .Dispatcher ;
25
29
import okhttp3 .mockwebserver .MockResponse ;
33
37
import org .springframework .http .MediaType ;
34
38
import org .springframework .web .util .UriComponentsBuilder ;
35
39
36
- import com .fasterxml .jackson .core .JsonProcessingException ;
37
- import com .fasterxml .jackson .core .type .TypeReference ;
38
- import com .fasterxml .jackson .databind .JsonMappingException ;
39
- import com .fasterxml .jackson .databind .ObjectMapper ;
40
-
41
40
import static org .assertj .core .api .Assertions .assertThat ;
42
41
import static org .assertj .core .api .Assertions .assertThatCode ;
43
42
@@ -102,7 +101,7 @@ public void issuerWhenResponseIsTypicalThenReturnedDecoderValidatesIssuer() {
102
101
JwtDecoder decoder = JwtDecoders .fromOidcIssuerLocation (this .issuer );
103
102
assertThatCode (() -> decoder .decode (ISSUER_MISMATCH ))
104
103
.isInstanceOf (JwtValidationException .class )
105
- .hasMessageContaining ("This iss claim is not equal to the configured issuer " );
104
+ .hasMessageContaining ("The iss claim is not valid " );
106
105
}
107
106
108
107
@ Test
@@ -111,7 +110,7 @@ public void issuerWhenOidcFallbackResponseIsTypicalThenReturnedDecoderValidatesI
111
110
JwtDecoder decoder = JwtDecoders .fromIssuerLocation (this .issuer );
112
111
assertThatCode (() -> decoder .decode (ISSUER_MISMATCH ))
113
112
.isInstanceOf (JwtValidationException .class )
114
- .hasMessageContaining ("This iss claim is not equal to the configured issuer " );
113
+ .hasMessageContaining ("The iss claim is not valid " );
115
114
}
116
115
117
116
@ Test
@@ -120,7 +119,7 @@ public void issuerWhenOAuth2ResponseIsTypicalThenReturnedDecoderValidatesIssuer(
120
119
JwtDecoder decoder = JwtDecoders .fromIssuerLocation (this .issuer );
121
120
assertThatCode (() -> decoder .decode (ISSUER_MISMATCH ))
122
121
.isInstanceOf (JwtValidationException .class )
123
- .hasMessageContaining ("This iss claim is not equal to the configured issuer " );
122
+ .hasMessageContaining ("The iss claim is not valid " );
124
123
}
125
124
126
125
@ Test
0 commit comments