github.com/greenpau/go-authcrunch@v1.1.4/pkg/errors/mfa_token.go (about) 1 // Copyright 2022 Paul Greenberg greenpau@outlook.com 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package errors 16 17 // MFA token errors. 18 const ( 19 ErrAddMfaToken StandardError = "failed adding MFA token: %v" 20 ErrDeleteMfaToken StandardError = "failed deleting MFA token %q: %v" 21 ErrGetMfaTokens StandardError = "failed getting MFA tokens: %v" 22 ErrGetMfaToken StandardError = "failed getting MFA token: %v" 23 24 ErrDuplicateMfaTokenSecret StandardError = "duplicate MFA token secret" 25 ErrDuplicateMfaTokenComment StandardError = "duplicate MFA token comment" 26 27 ErrMfaTokenEmptyAlgorithm StandardError = "empty MFA token algorithm" 28 ErrMfaTokenTypeEmpty StandardError = "empty MFA token type" 29 ErrMfaTokenInvalidType StandardError = "invalid MFA token type: %s" 30 ErrMfaTokenInvalidAlgorithm StandardError = "invalid MFA token algorithm: %s" 31 ErrMfaTokenInvalidPeriod StandardError = "invalid MFA token period: %d" 32 ErrMfaTokenInvalidDigits StandardError = "invalid MFA token digits: %d" 33 ErrMfaTokenInvalidPasscode StandardError = "invalid MFA token passcode: %v" 34 35 ErrWebAuthnRegisterNotFound StandardError = "webauthn register not found" 36 ErrWebAuthnChallengeNotFound StandardError = "webauthn challenge not found" 37 ErrWebAuthnParse StandardError = "failed parsing webauthn request: %v" 38 ErrWebAuthnEmptyRegisterID StandardError = "webauthn register id is empty" 39 ErrWebAuthnEmptyRegisterKeyType StandardError = "webauthn register key type is empty" 40 ErrWebAuthnInvalidRegisterKeyType StandardError = "invalid webauthn register key type: %v" 41 ErrWebAuthnEmptyRegisterTransport StandardError = "webauthn register key transport is empty" 42 ErrWebAuthnInvalidRegisterTransport StandardError = "invalid webauthn register key transport: %v" 43 ErrWebAuthnRegisterAttestationObjectNotFound StandardError = "webauthn register attestation object not found" 44 ErrWebAuthnRegisterAuthDataNotFound StandardError = "webauthn register attestation object auth data not found" 45 ErrWebAuthnRegisterCredentialDataNotFound StandardError = "webauthn register attestation object auth data credential not found" 46 ErrWebAuthnRegisterEmptyRelyingPartyID StandardError = "webauthn register attestation object auth data rpIdHash empty" 47 ErrWebAuthnRegisterEmptyFlags StandardError = "webauthn register attestation object auth data flags empty" 48 ErrWebAuthnRegisterPublicKeyNotFound StandardError = "webauthn register attestation object auth data credential public key not found" 49 ErrWebAuthnRegisterPublicKeyUnsupported StandardError = "webauthn register attestation object auth data credential public key type %v is unsupported" 50 ErrWebAuthnRegisterPublicKeyTypeNotFound StandardError = "webauthn register attestation object auth data credential public key type not found" 51 ErrWebAuthnRegisterPublicKeyAlgorithmUnsupported StandardError = "webauthn register attestation object auth data credential public key algorithm %v is unsupported" 52 ErrWebAuthnRegisterPublicKeyAlgorithmNotFound StandardError = "webauthn register attestation object auth data credential public key algorithm not found" 53 ErrWebAuthnRegisterPublicKeyCurveUnsupported StandardError = "webauthn register attestation object auth data credential public key curve_type %v is unsupported" 54 ErrWebAuthnRegisterPublicKeyTypeAlgorithmUnsupported StandardError = "webauthn register attestation object auth data credential public key type %q and algorithm %q are unsupported" 55 ErrWebAuthnRegisterPublicKeyParamNotFound StandardError = "webauthn register attestation object auth data credential public key has type %q and algorithm %q, but %q not found" 56 ErrWebAuthnRegisterPublicKeyCurveCoord StandardError = "webauthn register attestation object auth data credential public key curve %v coordinate error: %v" 57 ErrWebAuthnRegisterPublicKeyMaterial StandardError = "webauthn register attestation object auth data credential public key %q error: %v" 58 ErrWebAuthnRequest StandardError = "webauthn request failed: %v" 59 ErrWebAuthnVerifyRequest StandardError = "webauthn authentication request failed: %v" 60 )