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
Improve brittle tests using opaque token introspection
The tests that went through opaque token introspection rely on mocking
a specific method in the RestOperations interface which is very brittle
and hampers the ability to refactor internals.
They are changed to instead make actual HTTP requests to a MockWebServer
instead allowing refactoring changes. This is necessary to allow the
implementation to be swapped from NimbusOpaqueTokenIntrospector to
SpringOpaqueTokenIntrospector because the latter uses
RestOperations#exchange(String, ParameterizedType) instead of
RestOperations#exchange(String, String) of the former.
Signed-off-by: Andreas Svanberg <[email protected]>
Copy file name to clipboardExpand all lines: config/src/test/java/org/springframework/security/config/http/OAuth2ResourceServerBeanDefinitionParserTests.java
Copy file name to clipboardExpand all lines: config/src/test/resources/org/springframework/security/config/http/OAuth2ResourceServerBeanDefinitionParserTests-OpaqueTokenWebServer.xml
0 commit comments