Package com.avoka.fc.core.service.impl
Class AuthenticationServiceImpl
java.lang.Object
com.avoka.fc.core.service.impl.AuthenticationServiceImpl
- All Implemented Interfaces:
IAuthenticationService
Provides an authentication service implementation.
-
Field Summary
Fields inherited from interface com.avoka.fc.core.service.IAuthenticationService
SPRING_BEAN_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
associateRequestUser
(jakarta.servlet.http.HttpServletRequest request, RequestLog requestLog) Associate the user with the request log.void
associateSubmissionUser
(jakarta.servlet.http.HttpServletRequest request, Submission submission) Associate the user with the submission.getUserFormGroups
(jakarta.servlet.http.HttpServletRequest request) Gets the user form groups.getUserGroups
(jakarta.servlet.http.HttpServletRequest request) Gets the user groups.getUserId
(jakarta.servlet.http.HttpServletRequest request) Return user identifier for the given request.getUserJobGroups
(jakarta.servlet.http.HttpServletRequest request) Gets the user job groups.boolean
isAuthenticated
(jakarta.servlet.http.HttpServletRequest request) Return true if the user request has been authenticated by an external system.boolean
isUserInFormGroups
(jakarta.servlet.http.HttpServletRequest request) Return true if the user is in one or more form group.boolean
isUserInGroups
(jakarta.servlet.http.HttpServletRequest request, Set<String> groups) Return true if the user for the given request belongs to one of the specified groups.boolean
isUserInJobGroups
(jakarta.servlet.http.HttpServletRequest request, Set<String> groups) Return true if the user for the given request belongs to one of the specified job groups.
-
Constructor Details
-
AuthenticationServiceImpl
public AuthenticationServiceImpl()
-
-
Method Details
-
getUserId
Return user identifier for the given request.- Specified by:
getUserId
in interfaceIAuthenticationService
- Parameters:
request
- the user servlet request- Returns:
- user identifier for the given request
- See Also:
-
isAuthenticated
public boolean isAuthenticated(jakarta.servlet.http.HttpServletRequest request) Return true if the user request has been authenticated by an external system.- Specified by:
isAuthenticated
in interfaceIAuthenticationService
- Parameters:
request
- the user servlet request- Returns:
- true if the user request has been authenticated by an external system.
- See Also:
-
isUserInGroups
public boolean isUserInGroups(jakarta.servlet.http.HttpServletRequest request, Set<String> groups) throws ApplicationException Return true if the user for the given request belongs to one of the specified groups. If the providing group is empty, then it will return false- Specified by:
isUserInGroups
in interfaceIAuthenticationService
- Parameters:
request
- the user servlet requestgroups
- the set of group names- Returns:
- true if the user is in one of the specified groups
- Throws:
ApplicationException
- if the user request is not identified- See Also:
-
isUserInJobGroups
public boolean isUserInJobGroups(jakarta.servlet.http.HttpServletRequest request, Set<String> groups) throws ApplicationException Return true if the user for the given request belongs to one of the specified job groups. If the providing group is empty, then it will return false- Specified by:
isUserInJobGroups
in interfaceIAuthenticationService
- Parameters:
request
- the user servlet requestgroups
- the set of group names- Returns:
- true if the user is in one of the specified groups
- Throws:
ApplicationException
- if the user request is not identified- Since:
- 17.10.0
- See Also:
-
isUserInFormGroups
public boolean isUserInFormGroups(jakarta.servlet.http.HttpServletRequest request) throws ApplicationException Return true if the user is in one or more form group.- Specified by:
isUserInFormGroups
in interfaceIAuthenticationService
- Parameters:
request
- the user servlet request- Returns:
- true if the user is in one or more form group
- Throws:
ApplicationException
- if the user request is not identified- Since:
- 3.6.0
- See Also:
-
associateRequestUser
public void associateRequestUser(jakarta.servlet.http.HttpServletRequest request, RequestLog requestLog) Associate the user with the request log.- Specified by:
associateRequestUser
in interfaceIAuthenticationService
- Parameters:
request
- the user servlet requestrequestLog
- the request log record to update- See Also:
-
associateSubmissionUser
public void associateSubmissionUser(jakarta.servlet.http.HttpServletRequest request, Submission submission) Associate the user with the submission.- Specified by:
associateSubmissionUser
in interfaceIAuthenticationService
- Parameters:
request
- the user servlet requestsubmission
- the submission record to update- See Also:
-
getUserGroups
Gets the user groups.- Specified by:
getUserGroups
in interfaceIAuthenticationService
- Parameters:
request
- the request- Returns:
- the user groups
- See Also:
-
getUserFormGroups
Gets the user form groups.- Specified by:
getUserFormGroups
in interfaceIAuthenticationService
- Parameters:
request
- the request- Returns:
- the user groups
- Since:
- 4.3.4
- See Also:
-
getUserJobGroups
Gets the user job groups.- Specified by:
getUserJobGroups
in interfaceIAuthenticationService
- Parameters:
request
- the request- Returns:
- the user job groups
- Since:
- 17.10.0
- See Also:
-