|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.caplin.keymaster.servlet.UserCredentialsProvider
public class UserCredentialsProvider
Class used to provide user credentials to the defined response formatters. When the
StandardKeyMaster
needs to get the username to send back in
the response to the client, it will invoke the getUserName(javax.servlet.http.HttpServletRequest)
method of the
UserCredentialsProvider
that has been configured via the
user.credential.provider
servlet configuration parameter.
Constructor Summary | |
---|---|
UserCredentialsProvider()
|
Method Summary | |
---|---|
boolean |
getUseRemoteUser()
Gets whether the RemoteUser header should be used to obtain the username or not. |
String |
getUserName(javax.servlet.http.HttpServletRequest httpRequest)
Invoked when the StandardKeyMaster needs to get the
username to send back in the response to the client. |
void |
setUseRemoteUser(boolean useRemoteUser)
Sets whether the RemoteUser header should be used to obtain the username or not. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserCredentialsProvider()
Method Detail |
---|
public String getUserName(javax.servlet.http.HttpServletRequest httpRequest)
Invoked when the StandardKeyMaster
needs to get the
username to send back in the response to the client. If the setUseRemoteUser(boolean)
method has been invoked with a true
argument, this method will check whether
the RemoteUser has been specified in the request headers - if so it will return the value of
the RemoteUser. If the setUseRemoteUser(boolean)
method has not been invoked, or a
false
argument was passed in, this method will return the value of the
username
request parameter.
httpRequest
- The HttpServletRequest
which will provide access to all the
information required to determine the user credentials.
null
if
the required username parameter was not included within the request.public void setUseRemoteUser(boolean useRemoteUser)
useRemoteUser
- true
if the RemoteUser header should be used, otherwise
false
.public boolean getUseRemoteUser()
true
if the RemoteUser header should be used, otherwise
false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |