|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AdvancedResponseFormatter
This interface allows a user to specify a UserCredentialsProvider
class that can be used to supply user credentials.
Method Summary | |
---|---|
String |
formatResponse(javax.servlet.http.HttpServletRequest request,
String token,
UserCredentialsProvider provider)
This is the main method for the interface. |
Methods inherited from interface com.caplin.keymaster.servlet.ResponseFormatter |
---|
formatErrorResponse, formatResponse |
Method Detail |
---|
String formatResponse(javax.servlet.http.HttpServletRequest request, String token, UserCredentialsProvider provider)
This is the main method for the interface. It is used to encode the token and return the processed response in the appropriate format. This method should try to return a token but if an error occurs then the formatErrorResponse method should be called to correctly encode the error before returning to the calling servlet.
request
- This parameter should be used to retrieve any required information from the
query string that was used to call the servlet. Any missing query strings
should result in an error being returned (using the formatErrorResponse method).token
- The token that has been created for the request. Each token will be unique. The
token should only be returned if there were no errors during processing the response.provider
- this class should be used to get the username taht will be used to log into Liberator.
See UserCredentialsProvider.getUserName(HttpServletRequest)
for more details.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |