mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-01 09:42:13 +00:00
Update Mockito Usage
Issue gh-13542
This commit is contained in:
parent
985e569685
commit
87ae2d41b3
@ -29,7 +29,7 @@
|
||||
</http>
|
||||
|
||||
<b:bean name="handler" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="io.micrometer.observation.ObservationHandler"/>
|
||||
<b:constructor-arg value="io.micrometer.observation.ObservationHandler" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="ref" class="org.springframework.security.config.http.HttpConfigTests.MockObservationRegistry">
|
||||
|
@ -29,7 +29,7 @@
|
||||
</http>
|
||||
|
||||
<b:bean name="userFilter" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="jakarta.servlet.Filter"/>
|
||||
<b:constructor-arg value="jakarta.servlet.Filter" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:import resource="userservice.xml"/>
|
||||
|
@ -32,7 +32,7 @@
|
||||
</http>
|
||||
|
||||
<b:bean name="authenticationDetailsSource" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.authentication.AuthenticationDetailsSource"/>
|
||||
<b:constructor-arg value="org.springframework.security.authentication.AuthenticationDetailsSource" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:import resource="MiscHttpConfigTests-controllers.xml"/>
|
||||
|
@ -34,7 +34,7 @@
|
||||
<b:bean name="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
|
||||
<b:bean name="userFilter" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="jakarta.servlet.Filter"/>
|
||||
<b:constructor-arg value="jakarta.servlet.Filter" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:import resource="userservice.xml"/>
|
||||
|
@ -30,7 +30,7 @@
|
||||
</http>
|
||||
|
||||
<b:bean name="entryPoint" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.web.AuthenticationEntryPoint"/>
|
||||
<b:constructor-arg value="org.springframework.security.web.AuthenticationEntryPoint" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:import resource="userservice.xml"/>
|
||||
|
@ -29,7 +29,7 @@
|
||||
</http>
|
||||
|
||||
<b:bean name="entryPoint" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.web.AuthenticationEntryPoint"/>
|
||||
<b:constructor-arg value="org.springframework.security.web.AuthenticationEntryPoint" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:import resource="userservice.xml"/>
|
||||
|
@ -30,7 +30,7 @@
|
||||
</http>
|
||||
|
||||
<b:bean name="repo" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.web.context.SecurityContextRepository"/>
|
||||
<b:constructor-arg value="org.springframework.security.web.context.SecurityContextRepository" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:import resource="MiscHttpConfigTests-controllers.xml"/>
|
||||
|
@ -35,7 +35,7 @@
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="permissionEvaluator" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.access.PermissionEvaluator"/>
|
||||
<b:constructor-arg value="org.springframework.security.access.PermissionEvaluator" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:import resource="userservice.xml"/>
|
||||
|
@ -32,7 +32,7 @@
|
||||
</http>
|
||||
|
||||
<b:bean name="firewall" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.web.firewall.HttpFirewall"/>
|
||||
<b:constructor-arg value="org.springframework.security.web.firewall.HttpFirewall" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:import resource="userservice.xml"/>
|
||||
|
@ -48,7 +48,7 @@
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="jaasAuthorityGranter" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.authentication.jaas.AuthorityGranter"/>
|
||||
<b:constructor-arg value="org.springframework.security.authentication.jaas.AuthorityGranter" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<authentication-manager id="authenticationManager">
|
||||
|
@ -30,7 +30,7 @@
|
||||
</http>
|
||||
|
||||
<b:bean name="requestCache" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.web.savedrequest.RequestCache"/>
|
||||
<b:constructor-arg value="org.springframework.security.web.savedrequest.RequestCache" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:import resource="userservice.xml"/>
|
||||
|
@ -38,7 +38,7 @@
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="userService" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.core.userdetails.UserDetailsService"/>
|
||||
<b:constructor-arg value="org.springframework.security.core.userdetails.UserDetailsService" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="beanNameCollectingPostProcessor" class="org.springframework.security.BeanNameCollectingPostProcessor"/>
|
||||
|
@ -30,7 +30,7 @@
|
||||
</http>
|
||||
|
||||
<b:bean name="repo" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.web.context.SecurityContextRepository"/>
|
||||
<b:constructor-arg value="org.springframework.security.web.context.SecurityContextRepository" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:import resource="MiscHttpConfigTests-controllers.xml"/>
|
||||
|
@ -22,7 +22,7 @@
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<b:bean name="authenticationManagerResolver" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.authentication.AuthenticationManagerResolver"/>
|
||||
<b:constructor-arg value="org.springframework.security.authentication.AuthenticationManagerResolver" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<http>
|
||||
|
@ -22,10 +22,10 @@
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<b:bean name="authenticationManagerResolver" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.authentication.AuthenticationManagerResolver"/>
|
||||
<b:constructor-arg value="org.springframework.security.authentication.AuthenticationManagerResolver" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
<b:bean name="decoder" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.jwt.JwtDecoder"/>
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.jwt.JwtDecoder" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<http>
|
||||
|
@ -31,7 +31,7 @@
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="rest" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.web.client.RestOperations"/>
|
||||
<b:constructor-arg value="org.springframework.web.client.RestOperations" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="decoder"
|
||||
|
@ -26,7 +26,7 @@
|
||||
<c:component-scan base-package="org.springframework.security.config.http"/>
|
||||
<c:property-placeholder local-override="true"/>
|
||||
<b:bean name="decoder" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.jwt.JwtDecoder"/>
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.jwt.JwtDecoder" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<http>
|
||||
|
@ -22,7 +22,7 @@
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<b:bean name="rest" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.web.client.RestOperations"/>
|
||||
<b:constructor-arg value="org.springframework.web.client.RestOperations" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="decoder"
|
||||
|
@ -22,6 +22,6 @@
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<b:bean name="bearerTokenResolver" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.server.resource.web.BearerTokenResolver"/>
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.server.resource.web.BearerTokenResolver" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
</b:beans>
|
||||
|
@ -22,6 +22,6 @@
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<b:bean name="jwtAuthenticationConverter" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.core.convert.converter.Converter"/>
|
||||
<b:constructor-arg value="org.springframework.core.convert.converter.Converter" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
</b:beans>
|
||||
|
@ -22,6 +22,6 @@
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<b:bean name="decoder" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.jwt.JwtDecoder"/>
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.jwt.JwtDecoder" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
</b:beans>
|
||||
|
@ -22,11 +22,11 @@
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<b:bean name="jwtValidator" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.core.OAuth2TokenValidator"/>
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.core.OAuth2TokenValidator" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="rest" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.web.client.RestOperations"/>
|
||||
<b:constructor-arg value="org.springframework.web.client.RestOperations" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="decoder"
|
||||
|
@ -22,6 +22,6 @@
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<b:bean name="introspector" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector"/>
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
</b:beans>
|
||||
|
@ -21,9 +21,8 @@
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/security https://www.springframework.org/schema/security/spring-security.xsd
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<b:bean name="authentication-converter"
|
||||
class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenAuthenticationConverter"/>
|
||||
<b:bean name="authentication-converter" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenAuthenticationConverter" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<http>
|
||||
|
@ -22,7 +22,7 @@
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<b:bean name="introspector" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector"/>
|
||||
<b:constructor-arg value="org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<http>
|
||||
|
@ -22,7 +22,7 @@
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<b:bean name="rest" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.web.client.RestOperations"/>
|
||||
<b:constructor-arg value="org.springframework.web.client.RestOperations" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="introspector"
|
||||
|
@ -31,7 +31,7 @@
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="rest" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.web.client.RestOperations"/>
|
||||
<b:constructor-arg value="org.springframework.web.client.RestOperations" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:bean name="decoder"
|
||||
|
@ -34,12 +34,12 @@
|
||||
</authentication-manager>
|
||||
|
||||
<b:bean name="userDetailsService" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.core.userdetails.UserDetailsService"/>
|
||||
<b:constructor-arg value="org.springframework.security.core.userdetails.UserDetailsService" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<b:bean
|
||||
name="basicController"
|
||||
class="org.springframework.security.config.http.RememberMeConfigTests.BasicController"/>
|
||||
|
||||
|
||||
<b:import resource="handlermappingintrospector.xml"/>
|
||||
</b:beans>
|
||||
|
@ -23,7 +23,7 @@
|
||||
<b:import resource="classpath:org/springframework/security/config/websocket/websocket.xml"/>
|
||||
|
||||
<b:bean name="authorizationManager" class="org.mockito.Mockito" factory-method="mock">
|
||||
<b:constructor-arg value="org.springframework.security.authorization.AuthorizationManager"/>
|
||||
<b:constructor-arg value="org.springframework.security.authorization.AuthorizationManager" type="java.lang.Class"/>
|
||||
</b:bean>
|
||||
|
||||
<websocket-message-broker authorization-manager-ref="authorizationManager"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user