File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
src/main/java/com/github/ahunigel/test/security/oauth2 Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ _Refer to https://jitpack.io/#ahunigel/spring-security-oauth2-test for details._
6060 @Claim (name = " role_id" , value = " 1" ),
6161 @Claim (name = " is_social_user" , value = " false" )
6262 })
63- }
63+ )
6464```
6565or
6666``` java
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ dependencies {
2525 api platform(" org.springframework.boot:spring-boot-dependencies:${ springBootVersion} " )
2626 api platform(" org.springframework.cloud:spring-cloud-dependencies:${ springCloudVersion} " )
2727
28- api " org.springframework.security.oauth:spring-security-oauth2:2.5.2.RELEASE"
28+ implementation " org.springframework.security.oauth:spring-security-oauth2:2.5.2.RELEASE"
29+ implementation " org.springframework.security:spring-security-oauth2-client:6.3.3"
2930 api " org.springframework.boot:spring-boot-starter-test"
3031 api " org.springframework.security:spring-security-test"
3132 api group : ' commons-beanutils' , name : ' commons-beanutils' , version : ' 1.9.4'
Original file line number Diff line number Diff line change 1+ package com .github .ahunigel .test .security .oauth2 ;
2+
3+ import org .springframework .boot .test .mock .mockito .MockBean ;
4+ import org .springframework .boot .test .mock .mockito .MockReset ;
5+ import org .springframework .security .oauth2 .client .registration .InMemoryClientRegistrationRepository ;
6+
7+ import java .lang .annotation .Retention ;
8+ import java .lang .annotation .RetentionPolicy ;
9+
10+ /**
11+ * Mock client registration repository
12+ * <p>
13+ * Created by ahunigel on 10/16/2024.
14+ */
15+ @ Retention (RetentionPolicy .RUNTIME )
16+ @ MockBean (value = {InMemoryClientRegistrationRepository .class }, reset = MockReset .AFTER )
17+ public @interface MockClientRegistration {
18+ }
You can’t perform that action at this time.
0 commit comments