Package tv.hd3g.authkit.mod.service
Class AuthenticationServiceImpl
java.lang.Object
tv.hd3g.authkit.mod.service.AuthenticationServiceImpl
- All Implemented Interfaces:
AuthenticationService
@Service
@Transactional(readOnly=false)
public class AuthenticationServiceImpl
extends Object
implements AuthenticationService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContextInRight(String roleName, String rightName, String context) voidaddGroup(AddGroupOrRoleDto newGroup) voidaddGroupInRole(String groupName, String roleName) voidaddRightInRole(String roleName, String rightName) voidaddRole(AddGroupOrRoleDto newRole) addUser(AddUserDto addUser) voidaddUserInGroup(String userUUID, String groupName) voidchangeUserPassword(String userUUID, Password newPassword) voidcheckCodeAndPassword(Credential credential, ValidationTOTPDto validationDto) checkPassword(Password userEnterPassword, Credential credential) voiddisableUser(String userUUID) voidenableUser(String userUUID) getContextRightsForUser(String userUUID, String clientAddr, String rightName) getRightsForUser(String userUUID, String clientAddr) getUserPrivacyList(Collection<String> userUUIDList) booleanisUserEnabledAndNonBlocked(String userUUID) listContextsForRight(String roleName, String rightName) listGroupsForUser(String userUUID) listLinkedGroupsForRole(String roleName) listLinkedUsersForGroup(String groupName) listRightsForRole(String roleName) listRolesForGroup(String groupName) voidremoveContextInRight(String roleName, String rightName, String context) voidremoveGroup(String groupName) voidremoveGroupInRole(String groupName, String roleName) voidremoveRightInRole(String roleName, String rightName) voidremoveRole(String roleName) voidremoveUser(String userUUID) voidremoveUserInGroup(String userUUID, String groupName) voidrenameGroup(RenameGroupOrRoleDto renameGroup) voidrenameRole(RenameGroupOrRoleDto renameRole) voidresetUserLogonTrials(String userUUID) voidsetGroupDescription(AddGroupOrRoleDto changeGroup) voidsetRoleDescription(AddGroupOrRoleDto changeRole) voidsetRoleOnlyForClient(String roleName, String ipAddr) voidsetupTOTPWithChecks(ValidationSetupTOTPDto setupDto, String expectedUserUUID) voidsetUserMustChangePassword(String userUUID) voidsetUserPrivacy(String userUUID, UserPrivacyDto userPrivacyDto) userLoginRequest(jakarta.servlet.http.HttpServletRequest request, LoginFormDto form) userLoginRequest(jakarta.servlet.http.HttpServletRequest request, TOTPLogonCodeFormDto form)
-
Constructor Details
-
AuthenticationServiceImpl
public AuthenticationServiceImpl()
-
-
Method Details
-
checkPassword
public Optional<AuditReportService.RejectLoginCause> checkPassword(Password userEnterPassword, Credential credential) - Specified by:
checkPasswordin interfaceAuthenticationService
-
setupTOTPWithChecks
@Transactional(readOnly=false) public void setupTOTPWithChecks(ValidationSetupTOTPDto setupDto, String expectedUserUUID) - Specified by:
setupTOTPWithChecksin interfaceAuthenticationService
-
checkCodeAndPassword
@Transactional(readOnly=true) public void checkCodeAndPassword(Credential credential, ValidationTOTPDto validationDto) - Specified by:
checkCodeAndPasswordin interfaceAuthenticationService
-
userLoginRequest
public LoginRequestContentDto userLoginRequest(jakarta.servlet.http.HttpServletRequest request, LoginFormDto form) throws UserCantLoginException - Specified by:
userLoginRequestin interfaceAuthenticationService- Parameters:
request- (used by Audit)- Returns:
- sessionToken String
- Throws:
UserCantLoginException
-
userLoginRequest
public LoginRequestContentDto userLoginRequest(jakarta.servlet.http.HttpServletRequest request, TOTPLogonCodeFormDto form) throws UserCantLoginException, NotAcceptableSecuredTokenException - Specified by:
userLoginRequestin interfaceAuthenticationService- Parameters:
request- (used by Audit)- Returns:
- sessionToken String
- Throws:
UserCantLoginExceptionNotAcceptableSecuredTokenException
-
addUser
- Specified by:
addUserin interfaceAuthenticationService- Returns:
- userUUID
-
removeUser
- Specified by:
removeUserin interfaceAuthenticationService
-
disableUser
- Specified by:
disableUserin interfaceAuthenticationService
-
enableUser
- Specified by:
enableUserin interfaceAuthenticationService
-
resetUserLogonTrials
- Specified by:
resetUserLogonTrialsin interfaceAuthenticationService
-
setUserMustChangePassword
- Specified by:
setUserMustChangePasswordin interfaceAuthenticationService
-
changeUserPassword
public void changeUserPassword(String userUUID, Password newPassword) throws ResetWithSamePasswordException, BlockedUserException - Specified by:
changeUserPasswordin interfaceAuthenticationService- Throws:
ResetWithSamePasswordExceptionBlockedUserException
-
getRightsForUser
- Specified by:
getRightsForUserin interfaceAuthenticationService
-
getContextRightsForUser
- Specified by:
getContextRightsForUserin interfaceAuthenticationService
-
isUserEnabledAndNonBlocked
- Specified by:
isUserEnabledAndNonBlockedin interfaceAuthenticationService
-
addGroup
- Specified by:
addGroupin interfaceAuthenticationService
-
renameGroup
- Specified by:
renameGroupin interfaceAuthenticationService
-
setGroupDescription
- Specified by:
setGroupDescriptionin interfaceAuthenticationService
-
addUserInGroup
- Specified by:
addUserInGroupin interfaceAuthenticationService
-
removeUserInGroup
- Specified by:
removeUserInGroupin interfaceAuthenticationService
-
removeGroup
- Specified by:
removeGroupin interfaceAuthenticationService
-
listAllGroups
- Specified by:
listAllGroupsin interfaceAuthenticationService
-
listGroupsForUser
- Specified by:
listGroupsForUserin interfaceAuthenticationService
-
addRole
- Specified by:
addRolein interfaceAuthenticationService
-
renameRole
- Specified by:
renameRolein interfaceAuthenticationService
-
setRoleDescription
- Specified by:
setRoleDescriptionin interfaceAuthenticationService
-
setRoleOnlyForClient
- Specified by:
setRoleOnlyForClientin interfaceAuthenticationService
-
addGroupInRole
- Specified by:
addGroupInRolein interfaceAuthenticationService
-
removeGroupInRole
- Specified by:
removeGroupInRolein interfaceAuthenticationService
-
removeRole
- Specified by:
removeRolein interfaceAuthenticationService
-
listAllRoles
- Specified by:
listAllRolesin interfaceAuthenticationService
-
listRolesForGroup
- Specified by:
listRolesForGroupin interfaceAuthenticationService
-
addRightInRole
- Specified by:
addRightInRolein interfaceAuthenticationService
-
removeRightInRole
- Specified by:
removeRightInRolein interfaceAuthenticationService
-
getAllRights
- Specified by:
getAllRightsin interfaceAuthenticationService
-
listRightsForRole
- Specified by:
listRightsForRolein interfaceAuthenticationService
-
addContextInRight
- Specified by:
addContextInRightin interfaceAuthenticationService
-
removeContextInRight
- Specified by:
removeContextInRightin interfaceAuthenticationService
-
listContextsForRight
- Specified by:
listContextsForRightin interfaceAuthenticationService
-
listLinkedUsersForGroup
- Specified by:
listLinkedUsersForGroupin interfaceAuthenticationService
-
listLinkedGroupsForRole
- Specified by:
listLinkedGroupsForRolein interfaceAuthenticationService
-
getUserPrivacyList
- Specified by:
getUserPrivacyListin interfaceAuthenticationService
-
setUserPrivacy
- Specified by:
setUserPrivacyin interfaceAuthenticationService
-