Package org.dspace.app.rest.security
Interface RestAuthenticationService
-
- All Known Implementing Classes:
JWTTokenRestAuthenticationServiceImpl
@Service public interface RestAuthenticationServiceInterface for a service that can provide authentication for the REST API- Author:
- Frederic Van Reet (frederic dot vanreet at atmire dot com), Tom Desair (tom dot desair at atmire dot com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAuthenticationDataForUser(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, DSpaceAuthentication authentication, boolean addCookie)EPersongetAuthenticatedEPerson(javax.servlet.http.HttpServletRequest request, Context context)AuthenticationServicegetAuthenticationService()StringgetWwwAuthenticateHeaderValue(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Return the value that should be passed in the WWWW-Authenticate header for 4xx responses to the clientbooleanhasAuthenticationData(javax.servlet.http.HttpServletRequest request)voidinvalidateAuthenticationCookie(javax.servlet.http.HttpServletResponse res)voidinvalidateAuthenticationData(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Context context)
-
-
-
Method Detail
-
addAuthenticationDataForUser
void addAuthenticationDataForUser(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, DSpaceAuthentication authentication, boolean addCookie) throws IOException- Throws:
IOException
-
getAuthenticatedEPerson
EPerson getAuthenticatedEPerson(javax.servlet.http.HttpServletRequest request, Context context)
-
hasAuthenticationData
boolean hasAuthenticationData(javax.servlet.http.HttpServletRequest request)
-
invalidateAuthenticationData
void invalidateAuthenticationData(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Context context) throws Exception- Throws:
Exception
-
getAuthenticationService
AuthenticationService getAuthenticationService()
-
getWwwAuthenticateHeaderValue
String getWwwAuthenticateHeaderValue(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Return the value that should be passed in the WWWW-Authenticate header for 4xx responses to the client- Parameters:
request- The current client requestresponse- The response being build for the client- Returns:
- A string value that should be set in the WWWW-Authenticate header
-
invalidateAuthenticationCookie
void invalidateAuthenticationCookie(javax.servlet.http.HttpServletResponse res)
-
-