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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAccessService
(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 redirectionSSO login redirection with KeyCloaklogout()
Performs the logout actiononAuthenticationSuccess
(org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken oAuth2Token) 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:
-
UPDATE_OAUTH_ROLE
- 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
-
loginWithKeyCloakSSO
SSO login redirection with KeyCloak- Returns:
- do send redirect to Authentication server oauth portal
-
onAuthenticationSuccess
public String onAuthenticationSuccess(org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken oAuth2Token) throws AWException Manage Oauth success authentication- Parameters:
oAuth2Token
- Oauth2 token 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
-