public class OAuthClientCredentialsHandler extends Object implements HttpRequestHandler
Constructor and Description |
---|
OAuthClientCredentialsHandler(String servicePrincipalKey,
AccessKey accessKey)
Creates a new Laserfiche Cloud OAuth client credentials HTTP handler.
|
OAuthClientCredentialsHandler(String servicePrincipalKey,
AccessKey accessKey,
String scope)
Creates a new Laserfiche Cloud OAuth client credentials HTTP handler.
|
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 OAuthClientCredentialsHandler(String servicePrincipalKey, AccessKey accessKey)
servicePrincipalKey
- The service principal key created for the service principal from the Laserfiche Account Administration.accessKey
- The access key exported from the Laserfiche Developer Console.public OAuthClientCredentialsHandler(String servicePrincipalKey, AccessKey accessKey, String scope)
servicePrincipalKey
- The service principal key created for the service principal from the Laserfiche Account Administration.accessKey
- The access key exported from the Laserfiche Developer Console.scope
- The requested space-delimited scopes for the access token.public BeforeSendResult beforeSend(Request request)
HttpRequestHandler
beforeSend
in interface HttpRequestHandler
request
- The HTTP request.BeforeSendResult
public boolean afterSend(Response response)
HttpRequestHandler
afterSend
in interface HttpRequestHandler
response
- The HTTP response.public void close()
HttpRequestHandler
AutoCloseable
that does not throw any checked exceptions.
close
in interface HttpRequestHandler
close
in interface AutoCloseable
Copyright © 2024. All rights reserved.