Class UserProvider

java.lang.Object
dev.getelements.elements.security.UserProvider
All Implemented Interfaces:
jakarta.inject.Provider<User>

public class UserProvider extends Object implements jakarta.inject.Provider<User>
Iterates all bound UserAuthenticationMethods currently available and returns the User instance determined by a combindation of headers or other authentication methods. If no suitable authentication method is found, then this will resort to UserAuthenticationMethod.UNPRIVILEGED.
  • Constructor Details

    • UserProvider

      public UserProvider()
  • Method Details

    • get

      public User get()
      Specified by:
      get in interface jakarta.inject.Provider<User>
    • getSupportedAuthenticationMethods

      public Set<UserAuthenticationMethod> getSupportedAuthenticationMethods()
    • setSupportedAuthenticationMethods

      @Inject public void setSupportedAuthenticationMethods(Set<UserAuthenticationMethod> supportedAuthenticationMethods)