Add hints to invoke SecurityContextImpl#getAuthentication
Closes gh-11987
This commit is contained in:
@@ -49,6 +49,7 @@ import org.springframework.security.authentication.event.AuthenticationFailurePr
|
||||
import org.springframework.security.authentication.event.AuthenticationFailureProxyUntrustedEvent;
|
||||
import org.springframework.security.authentication.event.AuthenticationFailureServiceExceptionEvent;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.context.SecurityContextImpl;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
@@ -137,4 +138,10 @@ class CoreSecurityRuntimeHintsTests {
|
||||
.forResource("org/springframework/security/core/userdetails/jdbc/users.ddl")).accepts(this.hints);
|
||||
}
|
||||
|
||||
@Test
|
||||
void securityContextHasHints() {
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(SecurityContextImpl.class)
|
||||
.withMemberCategories(MemberCategory.INVOKE_PUBLIC_METHODS)).accepts(this.hints);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user