Class HvlAuthLdapAuthenticatorImpl
java.lang.Object
tr.com.havelsan.javarch.oauth.auth.starter.authenticator.HvlAuthLdapAuthenticatorImpl
- All Implemented Interfaces:
HvlAuthAuthenticator
The class which implements
HvlAuthAuthenticator
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionHvlAuthLdapAuthenticatorImpl
(HvlAuthBundleService bundleService, HvlAuthInstanceInternalEventPublisher instanceInternalEventPublisher, HvlAuthLoggerProducerProvider loggerProducerProvider, HvlLdapProvider ldapProvider, HvlOAuthUserManager userManager) Instantiates a new HvlAuthLdapAuthenticatorImpl. -
Method Summary
Modifier and TypeMethodDescriptionauthenticate
(@NotNull @Valid HvlAuthAuthenticationRequestModel authenticationRequestModel) Authenticate request model.forKey()
For key authentication type.protected HvlOAuthUserModel
getUserModelByUsernameAndTenant
(HvlAuthAuthenticationRequestModel authenticationRequestModel) Gets user model by username and tenant.prepareLogAttributeMap
(HvlOAuthUserModel userModel) Prepare log attribute map map.protected void
sendEventLog
(String eventLogType, String eventLogBundleKey, String username) Send event log.protected void
sendEventLog
(String eventLogType, String eventLogBundleKey, String username, String authenticationType) Send event log.protected void
Send log.protected void
sendLogAndOperationEvent
(String eventLogType, String eventLogBundleKey, Map<String, Object> eventLogAttributeMap, HvlOAuthOperationEventType operationEventType, String uuid, Long userDetailId, String username) Send log and operation event.protected void
sendLogAndOperationEvent
(String eventLogType, String eventLogBundleKey, Map<String, Object> eventLogAttributeMap, HvlOAuthUserOperationInfoEventModel infoEventModel) Send log and operation event.protected void
sendOperationEvent
(HvlOAuthOperationInfoEventModel infoEventModel) Send operation event.
-
Field Details
-
USERNAME_FIELD
The constant USERNAME_FIELD.- See Also:
-
AUTHENTICATION_TYPE_FIELD
The constant AUTHENTICATION_TYPE_FIELD.- See Also:
-
-
Constructor Details
-
HvlAuthLdapAuthenticatorImpl
public HvlAuthLdapAuthenticatorImpl(HvlAuthBundleService bundleService, HvlAuthInstanceInternalEventPublisher instanceInternalEventPublisher, HvlAuthLoggerProducerProvider loggerProducerProvider, HvlLdapProvider ldapProvider, HvlOAuthUserManager userManager) Instantiates a new HvlAuthLdapAuthenticatorImpl.- Parameters:
bundleService
- the bundle serviceinstanceInternalEventPublisher
- the instance internal event publisherloggerProducerProvider
- the logger producer providerldapProvider
- the ldap serviceuserManager
- the user manager
-
-
Method Details
-
forKey
For key authentication type.- Returns:
- the authentication type
-
authenticate
public HvlOAuthUserModel authenticate(@NotNull @Valid @NotNull @Valid HvlAuthAuthenticationRequestModel authenticationRequestModel) Authenticate request model.- Parameters:
authenticationRequestModel
- the authentication request model- Returns:
- the user model
-
sendLogAndOperationEvent
protected void sendLogAndOperationEvent(String eventLogType, String eventLogBundleKey, Map<String, Object> eventLogAttributeMap, HvlOAuthOperationEventType operationEventType, String uuid, Long userDetailId, String username) Send log and operation event.- Parameters:
eventLogType
- the event log typeeventLogBundleKey
- the event log bundle keyeventLogAttributeMap
- the event log attribute mapoperationEventType
- the operation event typeuuid
- the uuiduserDetailId
- the user detail idusername
- the username
-
sendEventLog
Send event log.- Parameters:
eventLogType
- the event log typeeventLogBundleKey
- the event log bundle keyusername
- the username
-
sendEventLog
protected void sendEventLog(String eventLogType, String eventLogBundleKey, String username, String authenticationType) Send event log.- Parameters:
eventLogType
- the event log typeeventLogBundleKey
- the event log bundle keyusername
- the usernameauthenticationType
- the authentication type
-
sendLogAndOperationEvent
protected void sendLogAndOperationEvent(String eventLogType, String eventLogBundleKey, Map<String, Object> eventLogAttributeMap, HvlOAuthUserOperationInfoEventModel infoEventModel) Send log and operation event.- Parameters:
eventLogType
- the event log typeeventLogBundleKey
- the event log bundle keyeventLogAttributeMap
- the event log attribute mapinfoEventModel
- the info event model
-
sendOperationEvent
Send operation event.- Parameters:
infoEventModel
- the info event model
-
sendLog
protected void sendLog(String eventLogType, String eventLogBundleKey, Map<String, Object> eventLogAttributeMap) Send log.- Parameters:
eventLogType
- the event log typeeventLogBundleKey
- the event log bundle keyeventLogAttributeMap
- the event log attribute map
-
prepareLogAttributeMap
Prepare log attribute map map.- Parameters:
userModel
- the user model- Returns:
- the map
-
getUserModelByUsernameAndTenant
protected HvlOAuthUserModel getUserModelByUsernameAndTenant(HvlAuthAuthenticationRequestModel authenticationRequestModel) Gets user model by username and tenant.- Parameters:
authenticationRequestModel
- the authentication request model- Returns:
- the user model by username and tenant
-