File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
servlet/spring-boot/java/authentication/mfa
formLogin+ott/src/main/java/example
oauth2/src/main/java/example
x509+formLogin/src/main/java/example
x509+webauthn/src/main/java/example Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 3030import org .springframework .security .authorization .AuthorizationManager ;
3131import org .springframework .security .authorization .AuthorizationManagerFactories ;
3232import org .springframework .security .config .Customizer ;
33- import org .springframework .security .config .annotation .authorization .EnableGlobalMultiFactorAuthentication ;
33+ import org .springframework .security .config .annotation .authorization .EnableMultiFactorAuthentication ;
3434import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
3535import org .springframework .security .core .userdetails .User ;
3636import org .springframework .security .core .userdetails .UserDetailsService ;
4242import static org .springframework .security .core .authority .FactorGrantedAuthority .PASSWORD_AUTHORITY ;
4343
4444@ Configuration (proxyBeanMethods = false )
45- @ EnableGlobalMultiFactorAuthentication (authorities = { PASSWORD_AUTHORITY , OTT_AUTHORITY })
45+ @ EnableMultiFactorAuthentication (authorities = { PASSWORD_AUTHORITY , OTT_AUTHORITY })
4646class SecurityDefaultsConfig {
4747
4848 @ Bean
Original file line number Diff line number Diff line change 2626import org .springframework .context .annotation .Bean ;
2727import org .springframework .context .annotation .Configuration ;
2828import org .springframework .security .config .Customizer ;
29+ import org .springframework .security .config .annotation .authorization .EnableMultiFactorAuthentication ;
2930import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
3031import org .springframework .security .config .oauth2 .client .CommonOAuth2Provider ;
3132import org .springframework .security .core .AuthenticationException ;
4243import org .springframework .stereotype .Component ;
4344
4445@ Configuration (proxyBeanMethods = false )
46+ @ EnableMultiFactorAuthentication (authorities = {})
4547class SecurityConfig {
4648
4749 static final String SCOPE = "https://www.googleapis.com/auth/gmail.readonly" ;
Original file line number Diff line number Diff line change 1919import org .springframework .context .annotation .Bean ;
2020import org .springframework .context .annotation .Configuration ;
2121import org .springframework .security .config .Customizer ;
22- import org .springframework .security .config .annotation .authorization .EnableGlobalMultiFactorAuthentication ;
22+ import org .springframework .security .config .annotation .authorization .EnableMultiFactorAuthentication ;
2323import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
2424import org .springframework .security .core .userdetails .User ;
2525import org .springframework .security .core .userdetails .UserDetailsService ;
3030import static org .springframework .security .core .authority .FactorGrantedAuthority .X509_AUTHORITY ;
3131
3232@ Configuration (proxyBeanMethods = false )
33- @ EnableGlobalMultiFactorAuthentication (authorities = { X509_AUTHORITY , PASSWORD_AUTHORITY })
33+ @ EnableMultiFactorAuthentication (authorities = { X509_AUTHORITY , PASSWORD_AUTHORITY })
3434public class SecurityConfig {
3535
3636 @ Bean
Original file line number Diff line number Diff line change 1919import org .springframework .context .annotation .Bean ;
2020import org .springframework .context .annotation .Configuration ;
2121import org .springframework .security .config .Customizer ;
22- import org .springframework .security .config .annotation .authorization .EnableGlobalMultiFactorAuthentication ;
22+ import org .springframework .security .config .annotation .authorization .EnableMultiFactorAuthentication ;
2323import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
2424import org .springframework .security .core .userdetails .User ;
2525import org .springframework .security .core .userdetails .UserDetailsService ;
3030import static org .springframework .security .core .authority .FactorGrantedAuthority .X509_AUTHORITY ;
3131
3232@ Configuration
33- @ EnableGlobalMultiFactorAuthentication (authorities = { X509_AUTHORITY , WEBAUTHN_AUTHORITY })
33+ @ EnableMultiFactorAuthentication (authorities = { X509_AUTHORITY , WEBAUTHN_AUTHORITY })
3434public class SecurityConfig {
3535
3636 @ Bean
You can’t perform that action at this time.
0 commit comments