Class AccessService

java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.service.AccessService
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class AccessService extends ServiceConfig
Manage application accesses
  • Field Details

  • Constructor Details

    • AccessService

      public AccessService(AweSessionDetails sessionDetails, MenuService menuService, EncodeService encodeService, TotpService totpService, BaseConfigProperties baseConfigProperties, SecurityConfigProperties securityConfigProperties, TotpConfigProperties totpConfigProperties)
      AccessService constructor
      Parameters:
      menuService - Menu service
      sessionDetails - Session details
      encodeService - Encode services
      totpService - Totp service
      baseConfigProperties - Base configuration properties
      securityConfigProperties - Security configuration properties
      totpConfigProperties - Totp configuration properties
  • Method Details

    • login

      public ServiceData login() throws AWException
      Performs the login action
      Returns:
      serviceData the result of the login
      Throws:
      AWException - Error generating login
    • verify2faCode

      public ServiceData verify2faCode(String code) throws AWException
      Retrieve QR Code in PNG format as String
      Returns:
      QR Code as string
      Throws:
      AWException
    • logout

      public ServiceData logout()
      Performs the logout action
      Returns:
      serviceData the result of the login
    • isAuthenticated

      public boolean isAuthenticated() throws AWException
      Check if user is authenticated
      Returns:
      User is authenticated
      Throws:
      AWException - Error checking authentication
    • getProfileNameFileList

      public ServiceData getProfileNameFileList() throws AWException
      Get profile restriction list
      Returns:
      Profile restriction file list
      Throws:
      AWException - Error retrieving profile list
    • encryptText

      public ServiceData encryptText(String textToEncrypt, String phraseKey) throws AWException
      Encrypts a text parameter with algorithm RipEmd160
      Parameters:
      textToEncrypt - text to encrypt
      phraseKey - phrase key
      Returns:
      Service Data with text encrypted
      Throws:
      AWException - Error
    • encryptProperty

      public ServiceData encryptProperty(String textToEncrypt, String phraseKey)
      Encrypts a text parameter with algorithm RipEmd160
      Parameters:
      textToEncrypt - text to encrypt
      phraseKey - phrase key
      Returns:
      Service Data with text encrypted