parent
431cd6000b
commit
283e451cad
|
@ -20,6 +20,10 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
import okhttp3.mockwebserver.Dispatcher;
|
import okhttp3.mockwebserver.Dispatcher;
|
||||||
import okhttp3.mockwebserver.MockResponse;
|
import okhttp3.mockwebserver.MockResponse;
|
||||||
|
@ -33,11 +37,6 @@ import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.web.util.UriComponentsBuilder;
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
|
||||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.assertj.core.api.Assertions.assertThatCode;
|
import static org.assertj.core.api.Assertions.assertThatCode;
|
||||||
|
|
||||||
|
@ -102,7 +101,7 @@ public class JwtDecodersTests {
|
||||||
JwtDecoder decoder = JwtDecoders.fromOidcIssuerLocation(this.issuer);
|
JwtDecoder decoder = JwtDecoders.fromOidcIssuerLocation(this.issuer);
|
||||||
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH))
|
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH))
|
||||||
.isInstanceOf(JwtValidationException.class)
|
.isInstanceOf(JwtValidationException.class)
|
||||||
.hasMessageContaining("This iss claim is not equal to the configured issuer");
|
.hasMessageContaining("The iss claim is not valid");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -111,7 +110,7 @@ public class JwtDecodersTests {
|
||||||
JwtDecoder decoder = JwtDecoders.fromIssuerLocation(this.issuer);
|
JwtDecoder decoder = JwtDecoders.fromIssuerLocation(this.issuer);
|
||||||
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH))
|
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH))
|
||||||
.isInstanceOf(JwtValidationException.class)
|
.isInstanceOf(JwtValidationException.class)
|
||||||
.hasMessageContaining("This iss claim is not equal to the configured issuer");
|
.hasMessageContaining("The iss claim is not valid");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -120,7 +119,7 @@ public class JwtDecodersTests {
|
||||||
JwtDecoder decoder = JwtDecoders.fromIssuerLocation(this.issuer);
|
JwtDecoder decoder = JwtDecoders.fromIssuerLocation(this.issuer);
|
||||||
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH))
|
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH))
|
||||||
.isInstanceOf(JwtValidationException.class)
|
.isInstanceOf(JwtValidationException.class)
|
||||||
.hasMessageContaining("This iss claim is not equal to the configured issuer");
|
.hasMessageContaining("The iss claim is not valid");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -20,6 +20,10 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
import okhttp3.mockwebserver.Dispatcher;
|
import okhttp3.mockwebserver.Dispatcher;
|
||||||
import okhttp3.mockwebserver.MockResponse;
|
import okhttp3.mockwebserver.MockResponse;
|
||||||
|
@ -33,11 +37,6 @@ import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.web.util.UriComponentsBuilder;
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
|
||||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThatCode;
|
import static org.assertj.core.api.Assertions.assertThatCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -104,7 +103,7 @@ public class ReactiveJwtDecodersTests {
|
||||||
|
|
||||||
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH).block())
|
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH).block())
|
||||||
.isInstanceOf(JwtValidationException.class)
|
.isInstanceOf(JwtValidationException.class)
|
||||||
.hasMessageContaining("This iss claim is not equal to the configured issuer");
|
.hasMessageContaining("The iss claim is not valid");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -115,7 +114,7 @@ public class ReactiveJwtDecodersTests {
|
||||||
|
|
||||||
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH).block())
|
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH).block())
|
||||||
.isInstanceOf(JwtValidationException.class)
|
.isInstanceOf(JwtValidationException.class)
|
||||||
.hasMessageContaining("This iss claim is not equal to the configured issuer");
|
.hasMessageContaining("The iss claim is not valid");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -126,7 +125,7 @@ public class ReactiveJwtDecodersTests {
|
||||||
|
|
||||||
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH).block())
|
assertThatCode(() -> decoder.decode(ISSUER_MISMATCH).block())
|
||||||
.isInstanceOf(JwtValidationException.class)
|
.isInstanceOf(JwtValidationException.class)
|
||||||
.hasMessageContaining("This iss claim is not equal to the configured issuer");
|
.hasMessageContaining("The iss claim is not valid");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue