Revert unnecessary merges on 6.0.x
This commit removes unnecessary main-branch merges starting from8750608b5band adds the following needed commit(s) that were made afterward: -5dce82c48b
This commit is contained in:
@@ -27,6 +27,7 @@ dependencies {
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-params"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-engine"
|
||||
testImplementation "org.mockito:mockito-core"
|
||||
testImplementation 'org.mockito:mockito-inline'
|
||||
testImplementation "org.mockito:mockito-junit-jupiter"
|
||||
testImplementation "org.springframework:spring-test"
|
||||
testImplementation 'org.skyscreamer:jsonassert'
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.context.SecurityContextHolderStrategy;
|
||||
|
||||
/**
|
||||
* A {@link WithSecurityContextFactory} that runs with an
|
||||
* A {@link WithAnonymousUserSecurityContextFactory} that runs with an
|
||||
* {@link AnonymousAuthenticationToken}. .
|
||||
*
|
||||
* @author Rob Winch
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* A {@link WithSecurityContextFactory} that works with {@link WithMockUser}.
|
||||
* A {@link WithUserDetailsSecurityContextFactory} that works with {@link WithMockUser}.
|
||||
*
|
||||
* @author Rob Winch
|
||||
* @since 4.0
|
||||
|
||||
+2
-1
@@ -34,7 +34,8 @@ import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* A {@link WithSecurityContextFactory} that works with {@link WithUserDetails} .
|
||||
* A {@link WithUserDetailsSecurityContextFactory} that works with {@link WithUserDetails}
|
||||
* .
|
||||
*
|
||||
* @author Rob Winch
|
||||
* @since 4.0
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public class SecurityMockServerConfigurerOpaqueTokenTests extends AbstractMockSe
|
||||
BearerTokenAuthentication token = (BearerTokenAuthentication) context.getAuthentication();
|
||||
assertThat(token.getAuthorities()).isNotEmpty();
|
||||
assertThat(token.getToken()).isNotNull();
|
||||
assertThat(token.getTokenAttributes()).containsEntry(OAuth2TokenIntrospectionClaimNames.SUB, "user");
|
||||
assertThat(token.getTokenAttributes().get(OAuth2TokenIntrospectionClaimNames.SUB)).isEqualTo("user");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ public class SecurityMockServerConfigurersJwtTests extends AbstractMockServerCon
|
||||
assertThat(token.getAuthorities()).isNotEmpty();
|
||||
assertThat(token.getToken()).isNotNull();
|
||||
assertThat(token.getToken().getSubject()).isEqualTo("user");
|
||||
assertThat(token.getToken().getHeaders()).containsEntry("alg", "none");
|
||||
assertThat(token.getToken().getHeaders().get("alg")).isEqualTo("none");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -137,7 +137,7 @@ public class SecurityMockServerConfigurersJwtTests extends AbstractMockServerCon
|
||||
JwtAuthenticationToken retrievedToken = (JwtAuthenticationToken) context.getAuthentication();
|
||||
assertThat(retrievedToken.getToken().getSubject()).isEqualTo("some_user");
|
||||
assertThat(retrievedToken.getToken().getTokenValue()).isEqualTo("token");
|
||||
assertThat(retrievedToken.getToken().getHeaders()).containsEntry("header1", "value1");
|
||||
assertThat(retrievedToken.getToken().getHeaders().get("header1")).isEqualTo("value1");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -102,7 +102,7 @@ public class SecurityMockMvcRequestPostProcessorsJwtTests {
|
||||
assertThat(token.getAuthorities()).isNotEmpty();
|
||||
assertThat(token.getToken()).isNotNull();
|
||||
assertThat(token.getToken().getSubject()).isEqualTo("user");
|
||||
assertThat(token.getToken().getHeaders()).containsEntry("alg", "none");
|
||||
assertThat(token.getToken().getHeaders().get("alg")).isEqualTo("none");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -160,7 +160,7 @@ public class SecurityMockMvcRequestPostProcessorsJwtTests {
|
||||
JwtAuthenticationToken retrievedToken = (JwtAuthenticationToken) context.getAuthentication();
|
||||
assertThat(retrievedToken.getToken().getSubject()).isEqualTo("some_user");
|
||||
assertThat(retrievedToken.getToken().getTokenValue()).isEqualTo("token");
|
||||
assertThat(retrievedToken.getToken().getHeaders()).containsEntry("header1", "value1");
|
||||
assertThat(retrievedToken.getToken().getHeaders().get("header1")).isEqualTo("value1");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public class Gh3409Tests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unauthenticatedNullAuthentication() throws Exception {
|
||||
public void unauthenticatedNullAuthenitcation() throws Exception {
|
||||
// @formatter:off
|
||||
this.mockMvc
|
||||
.perform(get("/")
|
||||
|
||||
Reference in New Issue
Block a user