class BasicAuth extends WebServiceAuth
username:password
combo from the request's
"Authorization" header.Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
AUTH_HEADER_NAME
The authorization header.
|
LOG, loginApiAuth, sm, timeout
Constructor and Description |
---|
BasicAuth(java.lang.String type,
boolean loginApiAuth,
int timeout)
Create a web service authentication and authorization with the specified details.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
authenticate(javax.servlet.http.HttpServletRequest request)
Authenticate this request, but do not create the FWD context.
|
private java.lang.String[] |
getAuthenticationDetails(javax.servlet.http.HttpServletRequest request)
Get the authentication details from the request.
|
protected java.lang.String |
login(javax.servlet.http.HttpServletRequest request)
Perform the actual login, which will create the FWD context associated with this web request.
|
authenticate, authorize, getAuthorizationToken, logout, setAuthorizationToken
private static final java.lang.String AUTH_HEADER_NAME
public BasicAuth(java.lang.String type, boolean loginApiAuth, int timeout)
type
- The web service type (REST, SOAP, WEBHANDLER).loginApiAuth
- Flag indicating if there is an explicit login API to be used.timeout
- The context timeout.protected java.lang.String login(javax.servlet.http.HttpServletRequest request)
login
in class WebServiceAuth
request
- The HTTP request.null
if the authentication failed.protected boolean authenticate(javax.servlet.http.HttpServletRequest request)
authenticate
in class WebServiceAuth
request
- The HTTP request.true
if the request contains valid credentials.private java.lang.String[] getAuthenticationDetails(javax.servlet.http.HttpServletRequest request)
For Basic authentication, the "Authorization" header must be set with the base64-encoded of
the username:password
combo, prefixed by the "Basic " string.
request
- The HTTP request.