2020import java .util .Map ;
2121import java .util .Optional ;
2222
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 ;
2327import okhttp3 .HttpUrl ;
2428import okhttp3 .mockwebserver .Dispatcher ;
2529import okhttp3 .mockwebserver .MockResponse ;
3337import org .springframework .http .MediaType ;
3438import org .springframework .web .util .UriComponentsBuilder ;
3539
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-
4140import static org .assertj .core .api .Assertions .assertThat ;
4241import static org .assertj .core .api .Assertions .assertThatCode ;
4342
@@ -102,7 +101,7 @@ public void issuerWhenResponseIsTypicalThenReturnedDecoderValidatesIssuer() {
102101 JwtDecoder decoder = JwtDecoders .fromOidcIssuerLocation (this .issuer );
103102 assertThatCode (() -> decoder .decode (ISSUER_MISMATCH ))
104103 .isInstanceOf (JwtValidationException .class )
105- .hasMessageContaining ("This iss claim is not equal to the configured issuer " );
104+ .hasMessageContaining ("The iss claim is not valid " );
106105 }
107106
108107 @ Test
@@ -111,7 +110,7 @@ public void issuerWhenOidcFallbackResponseIsTypicalThenReturnedDecoderValidatesI
111110 JwtDecoder decoder = JwtDecoders .fromIssuerLocation (this .issuer );
112111 assertThatCode (() -> decoder .decode (ISSUER_MISMATCH ))
113112 .isInstanceOf (JwtValidationException .class )
114- .hasMessageContaining ("This iss claim is not equal to the configured issuer " );
113+ .hasMessageContaining ("The iss claim is not valid " );
115114 }
116115
117116 @ Test
@@ -120,7 +119,7 @@ public void issuerWhenOAuth2ResponseIsTypicalThenReturnedDecoderValidatesIssuer(
120119 JwtDecoder decoder = JwtDecoders .fromIssuerLocation (this .issuer );
121120 assertThatCode (() -> decoder .decode (ISSUER_MISMATCH ))
122121 .isInstanceOf (JwtValidationException .class )
123- .hasMessageContaining ("This iss claim is not equal to the configured issuer " );
122+ .hasMessageContaining ("The iss claim is not valid " );
124123 }
125124
126125 @ Test
0 commit comments