public class UsernamePasswordHandler extends Object implements HttpRequestHandler
| Constructor and Description |
|---|
UsernamePasswordHandler(String repositoryId,
String username,
String password,
String baseUrl,
TokenClient client)
Creates a username and password authorization handler for the Laserfiche Self-Hosted API server
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
afterSend(Response response)
Invoked after an HTTP response is received and will determine if a new access token should be retrieved.
|
BeforeSendResult |
beforeSend(Request request)
Invoked before an HTTP request is sent.
|
void |
close()
An implementation of
AutoCloseable that does not throw any checked exceptions. |
public UsernamePasswordHandler(String repositoryId, String username, String password, String baseUrl, TokenClient client)
repositoryId - Repository ID.username - The username used with "password" grant type.password - The password used with "password" grant type.baseUrl - APIServer Base Url e.g. https://{APIServerName}/LFRepositoryAPI.client - OPTIONALpublic BeforeSendResult beforeSend(Request request)
HttpRequestHandlerbeforeSend in interface HttpRequestHandlerrequest - The HTTP request.BeforeSendResultpublic boolean afterSend(Response response)
HttpRequestHandlerafterSend in interface HttpRequestHandlerresponse - The HTTP response.public void close()
HttpRequestHandlerAutoCloseable that does not throw any checked exceptions.
close in interface HttpRequestHandlerclose in interface AutoCloseableCopyright © 2025. All rights reserved.