Class HvlAuthJpaAuthenticatorImpl

java.lang.Object
tr.com.havelsan.javarch.oauth.auth.starter.authenticator.HvlAuthJpaAuthenticatorImpl
All Implemented Interfaces:
HvlAuthAuthenticator

@Service public class HvlAuthJpaAuthenticatorImpl extends Object
The class which implements HvlAuthAuthenticator.
  • Field Details

    • USERNAME_FIELD

      public static final String USERNAME_FIELD
      The constant USERNAME_FIELD.
      See Also:
    • AUTHENTICATION_TYPE_FIELD

      public static final String AUTHENTICATION_TYPE_FIELD
      The constant AUTHENTICATION_TYPE_FIELD.
      See Also:
  • Constructor Details

  • Method Details

    • forKey

      public HvlAuthAuthenticationType forKey()
      For key authentication type.
      Returns:
      the authentication type
    • authenticate

      @Transactional(noRollbackFor=HvlAuthException.class) 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 type
      eventLogBundleKey - the event log bundle key
      eventLogAttributeMap - the event log attribute map
      operationEventType - the operation event type
      uuid - the uuid
      userDetailId - the user detail id
      username - the username
    • sendEventLog

      protected void sendEventLog(String eventLogType, String eventLogBundleKey, String username)
      Send event log.
      Parameters:
      eventLogType - the event log type
      eventLogBundleKey - the event log bundle key
      username - the username
    • sendEventLog

      protected void sendEventLog(String eventLogType, String eventLogBundleKey, String username, String authenticationType)
      Send event log.
      Parameters:
      eventLogType - the event log type
      eventLogBundleKey - the event log bundle key
      username - the username
      authenticationType - 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 type
      eventLogBundleKey - the event log bundle key
      eventLogAttributeMap - the event log attribute map
      infoEventModel - the info event model
    • sendOperationEvent

      protected void sendOperationEvent(HvlOAuthOperationInfoEventModel infoEventModel)
      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 type
      eventLogBundleKey - the event log bundle key
      eventLogAttributeMap - the event log attribute map
    • prepareLogAttributeMap

      protected Map<String,Object> prepareLogAttributeMap(HvlOAuthUserModel userModel)
      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