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 Summary
Modifier and TypeMethodDescriptioncreateAdminUser
(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.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.
-
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 objectusername
- The desired usernameemail
- The user's emailname
- The user's nameclient
- 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 objectclient
- The authorized clientusername
- The admin's username- Returns:
- The user, if updates were made, else empty.
-