common

package
v0.0.0-...-8b70b2c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2023 License: Unlicense Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TokenLen the full OTP from a Yubikey press
	TokenLen = TokenIDLen + TokenOTPLen
	// TokenIDLen  is the length of the Yubikey ID from a OTP token
	TokenIDLen = 12
	// TokenOTPLen is the length of the OTP passkey data
	TokenOTPLen = 32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status int
const (
	UNKNOWN_STATUS        Status = iota
	OK                           // The OTP is valid.
	BAD_OTP                      // The OTP is invalid format.
	REPLAYED_OTP                 // The OTP has already been seen by the service.
	BAD_SIGNATURE                // The HMAC signature verification failed.
	MISSING_PARAMETER            // The request lacks a parameter.
	NO_SUCH_CLIENT               // The request id does not exist.
	OPERATION_NOT_ALLOWED        // The request id is not allowed to verify OTPs.
	BACKEND_ERROR                // Unexpected error in our server. Please contact us if you see this error.
	NOT_ENOUGH_ANSWERS           // Server could not get requested number of syncs during before timeout
	REPLAYED_REQUEST             // Server has seen the OTP/Nonce combination before

	CRC_FAILURE
	EMPTY_YUBI_TOKEN  // provided OTP is empty
	UNREGISTERED_USER // Yubikey not registered in database
)

nolint

func StatusFromString

func StatusFromString(status string) Status

nolint:deadcode

func (Status) Error

func (s Status) Error() string

func (Status) IsError

func (s Status) IsError() bool

func (Status) IsRetryable

func (s Status) IsRetryable() bool

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL