Package com.almis.awe.service
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
Manage application accesses
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAccessService
(AweSessionDetails sessionDetails, MenuService menuService, EncodeService encodeService, TotpService totpService, BaseConfigProperties baseConfigProperties, SecurityConfigProperties securityConfigProperties, TotpConfigProperties totpConfigProperties, AweUserDetailService aweUserDetailService, MaintainService maintainService) AccessService constructor -
Method Summary
Modifier and TypeMethodDescriptionencryptProperty
(String textToEncrypt, String phraseKey) Encrypts a text parameter with algorithm RipEmd160encryptText
(String textToEncrypt, String phraseKey) Encrypts a text parameter with algorithm RipEmd160Get profile restriction listboolean
Check if user is authenticatedlogin()
Performs the login actionAzure EntraID redirectionlogout()
Performs the logout actiononAuthenticationSuccess
(org.springframework.security.oauth2.core.user.DefaultOAuth2User oauth2User) Manage Oauth success authenticationverify2faCode
(String code) Retrieve QR Code in PNG format as StringMethods inherited from class com.almis.awe.config.ServiceConfig
containsBean, getApplicationContext, getBean, getBean, getElements, getLocale, getLocale, getProperty, getProperty, getRequest, getSession, setApplicationContext
-
Field Details
-
PROVISIONING_NEW_USER
- See Also:
-
SCREEN
- See Also:
-
REDIRECT
- See Also:
-
CHANGE_LANGUAGE
- See Also:
-
CHANGE_THEME
- See Also:
-
-
Constructor Details
-
AccessService
public AccessService(AweSessionDetails sessionDetails, MenuService menuService, EncodeService encodeService, TotpService totpService, BaseConfigProperties baseConfigProperties, SecurityConfigProperties securityConfigProperties, TotpConfigProperties totpConfigProperties, AweUserDetailService aweUserDetailService, MaintainService maintainService) AccessService constructor- Parameters:
menuService
- Menu servicesessionDetails
- Session detailsencodeService
- Encode servicestotpService
- Totp servicebaseConfigProperties
- Base configuration propertiessecurityConfigProperties
- Security configuration propertiestotpConfigProperties
- Totp configuration propertiesaweUserDetailService
- Awe user detailsmaintainService
- Maintain service
-
-
Method Details
-
login
Performs the login action- Returns:
- serviceData the result of the login
- Throws:
AWException
- Error generating login
-
loginWithAzureEntraID
Azure EntraID redirection- Returns:
- do send redirect to Azure oauth portal
-
onAuthenticationSuccess
public String onAuthenticationSuccess(org.springframework.security.oauth2.core.user.DefaultOAuth2User oauth2User) throws AWException Manage Oauth success authentication- Parameters:
oauth2User
- Oauth2 user info- Returns:
- initial screen url for redirection
- Throws:
AWException
- AWE exception
-
verify2faCode
Retrieve QR Code in PNG format as String- Returns:
- QR Code as string
- Throws:
AWException
-
logout
Performs the logout action- Returns:
- serviceData the result of the login
-
isAuthenticated
Check if user is authenticated- Returns:
- User is authenticated
- Throws:
AWException
- Error checking authentication
-
getProfileNameFileList
Get profile restriction list- Returns:
- Profile restriction file list
-
encryptText
Encrypts a text parameter with algorithm RipEmd160- Parameters:
textToEncrypt
- text to encryptphraseKey
- phrase key- Returns:
- Service Data with text encrypted
- Throws:
AWException
- Error
-
encryptProperty
Encrypts a text parameter with algorithm RipEmd160- Parameters:
textToEncrypt
- text to encryptphraseKey
- phrase key- Returns:
- Service Data with text encrypted
-