public interface CrowdRememberMeService
CrowdRememberMeToken
Modifier and Type | Method and Description |
---|---|
Optional<org.springframework.security.core.Authentication> |
authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Attempts to authenticate a request using the remember-me cookie provided on the request.
|
void |
clearAllExpiredTokens()
Clears all expired remember me tokens
|
void |
clearAllTokens()
Clears all remember me tokens for all the users
|
void |
clearAllTokensForDirectory(Long directoryId)
Clears all remember me tokens for the users belonging to the given directoryId
|
void |
clearAllTokensForSeries(String series)
Clears all remember me tokens for the user with given series
|
void |
clearAllTokensForUserInDirectory(String username,
Long directoryId)
Clears all remember me tokens for the user with given username, and directory id
|
void |
createCookie(org.springframework.security.core.Authentication authentication,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Generates a new remember-me token for the user and sets the corresponding cookie on the response.
|
CrowdSpecificRememberMeSettings |
getConfiguration()
Retrieves current configuration
|
void |
removeCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Clears the remember-me cookie and removes all remember-me tokens for the corresponding series
|
void |
saveConfiguration(CrowdSpecificRememberMeSettings configuration)
Validates and stores passed configuration, if
CrowdSpecificRememberMeSettings.isEnabled() happens to be
false all existing tokens will be expired immediately |
Optional<org.springframework.security.core.Authentication> authenticate(@Nonnull javax.servlet.http.HttpServletRequest request, @Nonnull javax.servlet.http.HttpServletResponse response)
request
- the requestresponse
- the responseOptional.empty()
if authentication failed.void removeCookie(@Nonnull javax.servlet.http.HttpServletRequest request, @Nonnull javax.servlet.http.HttpServletResponse response)
request
- the requestresponse
- the responsevoid createCookie(@Nonnull org.springframework.security.core.Authentication authentication, @Nonnull javax.servlet.http.HttpServletRequest request, @Nonnull javax.servlet.http.HttpServletResponse response)
authentication
- valid authentication containing the user contextrequest
- the requestresponse
- the responsevoid clearAllTokensForSeries(String series)
void clearAllTokensForUserInDirectory(String username, Long directoryId)
void clearAllTokens()
void clearAllExpiredTokens()
void clearAllTokensForDirectory(Long directoryId)
void saveConfiguration(CrowdSpecificRememberMeSettings configuration)
CrowdSpecificRememberMeSettings.isEnabled()
happens to be
false
all existing tokens will be expired immediatelyconfiguration
- new configurationCrowdSpecificRememberMeSettings getConfiguration()
Copyright © 2020 Atlassian. All rights reserved.