Annotation Interface EnableGlobalMultiFactorAuthentication
@Retention(RUNTIME)
@Target(TYPE)
@Documented
@Import(org.springframework.security.config.annotation.authorization.GlobalMultiFactorAuthenticationConfiguration.class)
public @interface EnableGlobalMultiFactorAuthentication
Exposes a
DefaultAuthorizationManagerFactory as a Bean with the
authorities() specified as additional required authorities. The configuration
will be picked up by both
EnableWebSecurity
and
EnableMethodSecurity.
@Configuration
@EnableGlobalMultiFactorAuthentication(authorities = { GrantedAuthorities.FACTOR_OTT, GrantedAuthorities.FACTOR_PASSWORD })
public class MyConfiguration {
// ...
}
NOTE: At this time reactive applications do not support MFA and thus are not impacted.
This will likely be enhanced in the future.- Since:
- 7.0
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionString[]The additional authorities that are required.
-
Element Details
-
authorities
String[] authoritiesThe additional authorities that are required.- Returns:
- the additional authorities that are required (e.g. { FactorGrantedAuthority.FACTOR_OTT, FactorGrantedAuthority.FACTOR_PASSWORD })
- See Also:
-