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
(HttpServletRequest request, RequestLog requestLog) Associate the user with the request log.void
associateSubmissionUser
(HttpServletRequest request, Submission submission) Associate the user with the submission.getUserFormGroups
(HttpServletRequest request) Gets the user form groups.getUserGroups
(HttpServletRequest request) Gets the user groups.getUserId
(HttpServletRequest request) Return user identifier for the given request.getUserJobGroups
(HttpServletRequest request) Gets the user job groups.boolean
isAuthenticated
(HttpServletRequest request) Return true if the user request has been authenticated by an external system.boolean
isUserInFormGroups
(HttpServletRequest request) Return true if the user is in one or more form group.boolean
isUserInGroups
(HttpServletRequest request, Set<String> groups) Return true if the user for the given request belongs to one of the specified groups.boolean
isUserInJobGroups
(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
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(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(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
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
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
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:
-
IAuthenticationService#getFormUserGroups(HttpServletRequest)
-
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:
-
IAuthenticationService#getFormUserGroups(HttpServletRequest)
-