public final class DefaultCredentials extends Object
Credentials implementation. This implementation should
be used as the most simple way to access to the RedLink public platform
An user valid API key is necessary for building the credential object.| Modifier and Type | Field and Description |
|---|---|
static String |
DATAHUB |
static String |
ENDPOINT |
static String |
KEY_PARAM |
| Constructor and Description |
|---|
DefaultCredentials(String apiKey) |
DefaultCredentials(String apiKey,
String version) |
| Modifier and Type | Method and Description |
|---|---|
URI |
buildUrl(UriBuilder builder)
URI Builder for RedLink.
|
String |
getApiKey()
Get the API Key
|
String |
getDataHub()
Get the base URI of the data hub
|
String |
getEndpoint()
Get the API endpoint
|
Status |
getStatus()
Forces the update of the cached status
|
String |
getVersion()
Get the API version
|
boolean |
verify()
Verify the current (cached) credentials are valid
|
public static final String ENDPOINT
public static final String KEY_PARAM
public static final String DATAHUB
public DefaultCredentials(String apiKey)
public URI buildUrl(UriBuilder builder) throws MalformedURLException, IllegalArgumentException, URISyntaxException
Credentialsbuilder - base uri builderURIMalformedURLExceptionIllegalArgumentExceptionURISyntaxExceptionpublic String getEndpoint()
CredentialsgetEndpoint in interface Credentialspublic String getVersion()
CredentialsgetVersion in interface Credentialspublic String getApiKey()
CredentialsgetApiKey in interface Credentialspublic String getDataHub()
CredentialsgetDataHub in interface Credentialspublic boolean verify()
throws MalformedURLException
Credentialsverify in interface CredentialsMalformedURLExceptionpublic Status getStatus()
CredentialsgetStatus in interface CredentialsCopyright © 2018 Redlink GmbH. All rights reserved.