parent
52975e4480
commit
3e5fcee187
|
|
@ -28,6 +28,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.nimbusds.jose.JWSAlgorithm;
|
import com.nimbusds.jose.JWSAlgorithm;
|
||||||
import okhttp3.mockwebserver.MockResponse;
|
import okhttp3.mockwebserver.MockResponse;
|
||||||
import okhttp3.mockwebserver.MockWebServer;
|
import okhttp3.mockwebserver.MockWebServer;
|
||||||
|
import org.assertj.core.api.InstanceOfAssertFactories;
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
@ -99,7 +100,9 @@ class OAuth2ResourceServerAutoConfigurationTests {
|
||||||
JwtDecoder jwtDecoder = context.getBean(JwtDecoder.class);
|
JwtDecoder jwtDecoder = context.getBean(JwtDecoder.class);
|
||||||
Object processor = ReflectionTestUtils.getField(jwtDecoder, "jwtProcessor");
|
Object processor = ReflectionTestUtils.getField(jwtDecoder, "jwtProcessor");
|
||||||
Object keySelector = ReflectionTestUtils.getField(processor, "jwsKeySelector");
|
Object keySelector = ReflectionTestUtils.getField(processor, "jwsKeySelector");
|
||||||
assertThat(keySelector).hasFieldOrPropertyWithValue("jwsAlg", JWSAlgorithm.RS256);
|
assertThat(keySelector)
|
||||||
|
.extracting("jwsAlgs", InstanceOfAssertFactories.iterable(JWSAlgorithm.class))
|
||||||
|
.containsExactly(JWSAlgorithm.RS256);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,7 +115,9 @@ class OAuth2ResourceServerAutoConfigurationTests {
|
||||||
JwtDecoder jwtDecoder = context.getBean(JwtDecoder.class);
|
JwtDecoder jwtDecoder = context.getBean(JwtDecoder.class);
|
||||||
Object processor = ReflectionTestUtils.getField(jwtDecoder, "jwtProcessor");
|
Object processor = ReflectionTestUtils.getField(jwtDecoder, "jwtProcessor");
|
||||||
Object keySelector = ReflectionTestUtils.getField(processor, "jwsKeySelector");
|
Object keySelector = ReflectionTestUtils.getField(processor, "jwsKeySelector");
|
||||||
assertThat(keySelector).hasFieldOrPropertyWithValue("jwsAlg", JWSAlgorithm.RS384);
|
assertThat(keySelector)
|
||||||
|
.extracting("jwsAlgs", InstanceOfAssertFactories.iterable(JWSAlgorithm.class))
|
||||||
|
.containsExactly(JWSAlgorithm.RS384);
|
||||||
assertThat(getBearerTokenFilter(context)).isNotNull();
|
assertThat(getBearerTokenFilter(context)).isNotNull();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1738,7 +1738,7 @@ bom {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
library("Spring Security", "5.3.2.RELEASE") {
|
library("Spring Security", "5.3.3.RELEASE") {
|
||||||
group("org.springframework.security") {
|
group("org.springframework.security") {
|
||||||
imports = [
|
imports = [
|
||||||
"spring-security-bom"
|
"spring-security-bom"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue