Class BasicAuthenticationHelper
java.lang.Object
com.atlassian.crowd.plugin.rest.filter.BasicAuthenticationHelper
A collection of methods that help implementing HTTP basic auth for end users and applications.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiongetBasicAuthCredentials(javax.servlet.http.HttpServletRequest request) Returns the Basic Auth credentials.static voidrespondWithChallenge(javax.servlet.http.HttpServletResponse response, String message, String basicAuthRealm) Responds to request with a message and a Basic Authentication challenge.
-
Method Details
-
getBasicAuthCredentials
public static BasicAuthenticationHelper.Credentials getBasicAuthCredentials(javax.servlet.http.HttpServletRequest request) Returns the Basic Auth credentials.- Parameters:
request- the request- Returns:
- basic authentication credentials
-
respondWithChallenge
public static void respondWithChallenge(javax.servlet.http.HttpServletResponse response, String message, String basicAuthRealm) throws IOException Responds to request with a message and a Basic Authentication challenge.- Parameters:
response- the HTTP responsemessage- plain text message to sendbasicAuthRealm- used as the realm for the WWWW-Authenticate header- Throws:
IOException
-