Interface AuthService
-
- All Known Implementing Classes:
RedisAuthService,SessionAuthService,TokenAuthService
public interface AuthService
-
-
Field Summary
Fields Modifier and Type Field Description static StringAUTH_HEADER_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)Add the authentication on the response after performs other operations like persistence server sideCollection<String>extractUserAppRoles(Collection<String> roles)org.springframework.security.core.AuthenticationgetAuthentication(javax.servlet.http.HttpServletRequest request)longgetTokenTimeout()default TokenUsergetTokenUser(org.springframework.security.core.Authentication authentication)Set<String>getVisibleComponents(Collection<String> roles)
-
-
-
Field Detail
-
AUTH_HEADER_NAME
static final String AUTH_HEADER_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAuthentication
org.springframework.security.core.Authentication getAuthentication(javax.servlet.http.HttpServletRequest request)
-
addAuthentication
void addAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)Add the authentication on the response after performs other operations like persistence server side- Parameters:
request- the http requestresponse- the http responseauthentication- the authentication
-
extractUserAppRoles
Collection<String> extractUserAppRoles(Collection<String> roles)
- Parameters:
roles- a collection of roles- Returns:
- the intersection between aplication defined roles and the one from the collection
-
getTokenUser
default TokenUser getTokenUser(org.springframework.security.core.Authentication authentication)
- Parameters:
authentication- the spring security Authentication- Returns:
- the Token user
-
getTokenTimeout
long getTokenTimeout()
- Returns:
- milliseconds until expiration
-
getVisibleComponents
Set<String> getVisibleComponents(Collection<String> roles)
- Parameters:
roles- the collection of roles- Returns:
- collection of visible ui components for roles
-
-