public class PrivateKeyClient extends AbstractClient
| Modifier and Type | Field and Description |
|---|---|
static String |
PRIVATE_KEY_BASE_URL |
accessToken, builder, httpClient| Constructor and Description |
|---|
PrivateKeyClient(String baseUrl,
String accessToken,
VirgilCard serviceCard)
Create a new instance of
PrivateKeyClient |
PrivateKeyClient(String accessToken,
VirgilCard serviceCard)
Create a new instance of
PrivateKeyClient |
| Modifier and Type | Method and Description |
|---|---|
<S> S |
createService(Class<S> serviceClass,
PrivateKey privateKey,
Password privateKeyPassword,
Password responsePassword)
Create new instance of Retrofit service.
|
void |
destroy(String virgilCardId,
PrivateKey privateKey)
Deletes the private key from service by specified card ID.
|
void |
destroy(String virgilCardId,
PrivateKey privateKey,
Password password)
Deletes the private key from service by specified card ID.
|
void |
destroy(String virgilCardId,
PrivateKey privateKey,
Password password,
VoidResponseCallback callback)
Deletes the private key from service by specified card ID.
|
void |
destroy(String virgilCardId,
PrivateKey privateKey,
VoidResponseCallback callback)
Deletes the private key from service by specified card ID.
|
PrivateKeyInfo |
get(String virgilCardId,
ValidatedIdentity identity)
Downloads private part of key by its public id.
|
void |
get(String virgilCardId,
ValidatedIdentity identity,
ResponseCallback<PrivateKeyInfo> callback)
Downloads private part of key by its public id.
|
Object |
handleResponse(retrofit2.Response<?> response)
Handle response from Virgil service.
|
void |
stash(String virgilCardId,
PrivateKey privateKey)
Uploads private key to private key store.
|
void |
stash(String virgilCardId,
PrivateKey privateKey,
Password password)
Uploads private key to private key store.
|
void |
stash(String virgilCardId,
PrivateKey privateKey,
Password password,
VoidResponseCallback callback)
Uploads private key to private key store.
|
void |
stash(String virgilCardId,
PrivateKey privateKey,
VoidResponseCallback callback)
Uploads private key to private key store.
|
createServicepublic static final String PRIVATE_KEY_BASE_URL
public PrivateKeyClient(String accessToken, VirgilCard serviceCard)
PrivateKeyClientaccessToken - the access token.serviceCard - the the service's Virgil Cardpublic PrivateKeyClient(String baseUrl, String accessToken, VirgilCard serviceCard)
PrivateKeyClientbaseUrl - the base URL of Virgil Keys endpoint.accessToken - the access token.serviceCard - the the service's Virgil Cardpublic <S> S createService(Class<S> serviceClass, PrivateKey privateKey, Password privateKeyPassword, Password responsePassword)
serviceClass - Retrofit service classprivateKey - the PrivateKey used for request signingprivateKeyPassword - the Password used for PrivateKey protectionresponsePassword - the Password to encrypt server response. Up to 31 characters.PrivateKey,
Passwordpublic Object handleResponse(retrofit2.Response<?> response) throws IOException
AbstractClienthandleResponse in class AbstractClientIOExceptionpublic void stash(String virgilCardId, PrivateKey privateKey)
virgilCardId - The public key identifier.privateKey - The private key value. Private key is used to produce sign. It
is not transfered over network.public void stash(String virgilCardId, PrivateKey privateKey, Password password)
virgilCardId - The public key identifier.privateKey - The private key value. Private key is used to produce sign. It
is not transfered over network.password - The private key password.public void stash(String virgilCardId, PrivateKey privateKey, VoidResponseCallback callback)
virgilCardId - The public key identifier.privateKey - The private key value. Private key is used to produce sign. It
is not transfered over network.callback - public void stash(String virgilCardId, PrivateKey privateKey, Password password, VoidResponseCallback callback)
virgilCardId - the public key identifier.privateKey - the private key value. Private key is used to produce sign. It
is not transfered over network.password - the private key password.callback - public PrivateKeyInfo get(String virgilCardId, ValidatedIdentity identity)
virgilCardId - the public key identifier.identity - the validated identity token with.public void get(String virgilCardId, ValidatedIdentity identity, ResponseCallback<PrivateKeyInfo> callback)
virgilCardId - the public key identifier.identity - the validated identity token with.public void destroy(String virgilCardId, PrivateKey privateKey)
virgilCardId - The public key identifier.privateKey - The private key value. Private key is used to produce sign. It
is not transfered over network.public void destroy(String virgilCardId, PrivateKey privateKey, Password password)
virgilCardId - The public key identifier.privateKey - The private key value. Private key is used to produce sign. It
is not transfered over network.password - The private key password.public void destroy(String virgilCardId, PrivateKey privateKey, VoidResponseCallback callback)
virgilCardId - the public key identifier.privateKey - the private key value. Private key is used to produce sign. It
is not transfered over network.callback - public void destroy(String virgilCardId, PrivateKey privateKey, Password password, VoidResponseCallback callback)
virgilCardId - the public key identifier.privateKey - the private key value. Private key is used to produce sign. It
is not transfered over network.password - the private key password.callback - Copyright © 2016. All rights reserved.