Class AnonymousAuthenticationLocaleResolver

java.lang.Object
io.jmix.ui.sys.localeresolver.AnonymousAuthenticationLocaleResolver
All Implemented Interfaces:
AuthenticationLocaleResolver, org.springframework.core.Ordered

@Component("ui_AnonymousAuthenticationLocaleResolver") public class AnonymousAuthenticationLocaleResolver extends Object implements AuthenticationLocaleResolver
Provides Locale from App instance that should be used if current authentication is anonymous.
See Also:
  • Field Details

    • messageTools

      @Autowired protected MessageTools messageTools
  • Constructor Details

    • AnonymousAuthenticationLocaleResolver

      public AnonymousAuthenticationLocaleResolver()
  • Method Details

    • supports

      public boolean supports(org.springframework.security.core.Authentication authentication)
      Specified by:
      supports in interface AuthenticationLocaleResolver
      Parameters:
      authentication - authentication to check
      Returns:
      true if resolver supports given authentication
    • getLocale

      @Nullable public Locale getLocale(org.springframework.security.core.Authentication authentication)
      Specified by:
      getLocale in interface AuthenticationLocaleResolver
      Parameters:
      authentication - authentication
      Returns:
      locale that should be used, or null
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered