Documentation ¶
Overview ¶
Package yubiotp provides a client for the OTP validation server (YubiCloud or self-hosted) and the validation server implementation.
Index ¶
Constants ¶
View Source
const ( StatusOK = Status("OK") StatusBadOTP = Status("BAD_OTP") StatusReplayedOTP = Status("REPLAYED_OTP") StatusBadSignature = Status("BAD_SIGNATURE") StatusMissingParameter = Status("MISSING_PARAMETER") StatusNoSuchClient = Status("NO_SUCH_CLIENT") StatusOperationNotAllowed = Status("OPERATION_NOT_ALLOWED") StatusBackendError = Status("BACKEND_ERROR") StatusNotEnoughAnswers = Status("NOT_ENOUGH_ANSWERS") StatusReplayedRequest = Status("REPLAYED_REQUEST") )
Known validation statuses.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents validation server's client.
It can be used with both YubiCloud and self-hosted servers.
See:
- https://upgrade.yubico.com/getapikey/
- https://developers.yubico.com/yubikey-val/Getting_Started_Writing_Clients.html
- https://developers.yubico.com/OTP/Specifications/OTP_validation_protocol.html
func NewClient ¶
NewClient creates a new client with given client ID (required by YubiCloud, use "1" if unknown) and base64-encoded secret key (optional).
Click to show internal directories.
Click to hide internal directories.