public class YubicoClientImpl extends YubicoClient
Modifier and Type | Field and Description |
---|---|
private VerificationRequester |
validationService |
clientId, key, maxRetries, sync, userAgent, wsapi_urls
Constructor and Description |
---|
YubicoClientImpl(Integer clientId)
Creates a YubicoClient that will be using the given Client ID.
|
YubicoClientImpl(Integer clientId,
String apiKey)
Creates a YubicoClient that will be using the given Client ID and API key.
|
YubicoClientImpl(Integer clientId,
String apiKey,
Integer sync)
Creates a YubicoClient that will be using the given Client ID and API key.
|
YubicoClientImpl(VerificationRequester validationService) |
Modifier and Type | Method and Description |
---|---|
private String |
sign(String queryString) |
VerificationResponse |
verify(String otp)
Validate an OTP using a webservice call to one or more ykval validation servers.
|
private void |
verifySignature(VerificationResponse response) |
getClient, getClientId, getKey, getPublicId, getWsapiUrls, isValidOTPFormat, setClientId, setKey, setMaxRetries, setSync, setUserAgent, setWsapiUrls, warnIfDeprecatedUrl
private final VerificationRequester validationService
YubicoClientImpl(VerificationRequester validationService)
public YubicoClientImpl(Integer clientId)
clientId
- Retrieved from https://upgrade.yubico.com/getapikeypublic YubicoClientImpl(Integer clientId, String apiKey)
clientId
- Retrieved from https://upgrade.yubico.com/getapikeyapiKey
- Retrieved from https://upgrade.yubico.com/getapikeypublic YubicoClientImpl(Integer clientId, String apiKey, Integer sync)
clientId
- Retrieved from https://upgrade.yubico.com/getapikeyapiKey
- Retrieved from https://upgrade.yubico.com/getapikeysync
- A value 0 to 100 indicating percentage of syncing required by client, or strings "fast" or "secure"
to use server-configured values; if absent, let the server decidepublic VerificationResponse verify(String otp) throws YubicoVerificationException, YubicoValidationFailure
verify
in class YubicoClient
otp
- YubiKey OTPYubicoVerificationException
- for validation errors, like unreachable serversYubicoValidationFailure
- for validation failures, like non matching OTPs in request and responseprivate void verifySignature(VerificationResponse response) throws YubicoValidationFailure, YubicoVerificationException
private String sign(String queryString) throws YubicoVerificationException
YubicoVerificationException
Copyright © 2020 Yubico AB. All Rights Reserved.