Interface ExternalAdminUserHandler<T extends org.springframework.security.core.Authentication>

All Known Implementing Classes:
AbstractExternalAdminUserHandler, OAuthExternalAdminUserHandler

public interface ExternalAdminUserHandler<T extends org.springframework.security.core.Authentication>
This service handles creation and management admin users that login via third party authentication providers. This is executed in the authentication flow.
  • Method Details

    • createAdminUser

      User createAdminUser(T authentication, String username, String email, String name, AuthorizedClient client)
      Responsible for initializing and creating an admin if automatic admin creation is enabled for third party IDP. In addition, emits a user created event that is consumed by the Admin User service.
      Parameters:
      authentication - The authentication object
      username - The desired username
      email - The user's email
      name - The user's name
      client - The authorized client
      Returns:
      The newly created admin
    • handleThirdPartyAdminLogin

      Optional<User> handleThirdPartyAdminLogin(T authentication, AuthorizedClient client, String username)
      Upon successful login of an existing admin user, handle any relevant updates and return the user if modifications occurred.
      Parameters:
      authentication - The authenication object
      client - The authorized client
      username - The admin's username
      Returns:
      The user, if updates were made, else empty.