Client for the Yubico validation service, version 2.0.
http://code.google.com/p/yubikey-val-server-php/wiki/ValidationProtocolV20
Parameters: |
|
---|
The base URL of the validation service. Set this if you want to use a custom validation service. Defaults to 'http[s]://api.yubico.com/wsapi/2.0/verify'.
Verify a single Yubikey OTP against the validation service.
Parameters: | token (str) – A modhex-encoded YubiKey OTP, as generated by a YubiKey device. |
---|---|
Returns: | A response from the validation service. |
Return type: | YubiResponse |
Generates the validation URL without sending a request.
Parameters: |
|
---|---|
Returns: | The URL that we would use to validate the token. |
Return type: | str |
Client for the Yubico validation service, version 1.1.
http://code.google.com/p/yubikey-val-server-php/wiki/ValidationProtocolV11
Parameters: |
|
---|
The base URL of the validation service. Set this if you want to use a custom validation service. Defaults to 'http[s]://api.yubico.com/wsapi/verify'.
Verify a single Yubikey OTP against the validation service.
Parameters: | token (str) – A modhex-encoded YubiKey OTP, as generated by a YubiKey device. |
---|---|
Returns: | A response from the validation service. |
Return type: | YubiResponse |
Generates the validation URL without sending a request.
Parameters: |
|
---|---|
Returns: | The URL that we would use to validate the token. |
Return type: | str |
Client for the Yubico validation service, version 1.0.
http://code.google.com/p/yubikey-val-server-php/wiki/ValidationProtocolV10
Parameters: |
|
---|
The base URL of the validation service. Set this if you want to use a custom validation service. Defaults to 'http[s]://api.yubico.com/wsapi/verify'.
Verify a single Yubikey OTP against the validation service.
Parameters: | token (str) – A modhex-encoded YubiKey OTP, as generated by a YubiKey device. |
---|---|
Returns: | A response from the validation service. |
Return type: | YubiResponse |
Generates the validation URL without sending a request.
Parameters: |
|
---|---|
Returns: | The URL that we would use to validate the token. |
Return type: | str |
A response from the Yubico validation service.
A dictionary of the response fields (excluding ‘h’).
Returns true if all validation checks pass and the status is ‘OK’.
Return type: | bool |
---|
If the response is valid, this returns the value of the status field. Otherwise, it returns the special status 'BAD_RESPONSE'
Performs all validity checks (signature, token, and nonce).
Parameters: | strict (bool) – If True, all validity checks must pass unambiguously. Otherwise, this only requires that no validity check fails. |
---|---|
Returns: | True if none of the validity checks fail. |
Return type: | bool |
Validates the response signature.
Returns: | True if the signature is valid or if we did not sign the request. False if the signature is invalid. |
---|---|
Return type: | bool |
Validates the otp token sent in the response.
Returns: | True if the token in the response is the same as the one in the request; False if not; None if the response does not contain a token. |
---|---|
Return type: | bool for a positive result or None for an ambiguous result. |
Validates the nonce value sent in the response.
Returns: | True if the nonce in the response matches the one we sent (or didn’t send). False if the two do not match. None if we sent a nonce and did not receive one in the response: this is often true of error responses. |
---|---|
Return type: | bool for a positive result or None for an ambiguous result. |