public class KeysDownloader extends Object
This class can be used to download keys from a remote HTTPS server.
Use KeysDownloader.Builder
to construct an instance and keep it as a singleton in a
static final variable across requests.
When initializing your server, we also recommend that you call refreshInBackground()
to proactively fetch the data.
Modifier and Type | Class and Description |
---|---|
static class |
KeysDownloader.Builder
Builder for
KeysDownloader . |
Constructor and Description |
---|
KeysDownloader(Executor backgroundExecutor,
com.google.api.client.http.HttpTransport httpTransport,
String url) |
Modifier and Type | Method and Description |
---|---|
String |
download()
Returns a string containing a JSON with the Google public signing keys.
|
com.google.api.client.http.HttpTransport |
getHttpTransport() |
String |
getUrl() |
void |
refreshInBackground()
Fetches keys in the background.
|
public String download() throws IOException
Meant to be called by PaymentMethodTokenRecipient
.
IOException
public com.google.api.client.http.HttpTransport getHttpTransport()
public String getUrl()
public void refreshInBackground()