github.com/greenpau/go-identity@v1.1.6/pkg/errors/mfa_token.go (about)

     1  // Copyright 2020 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  
    23  	ErrDuplicateMfaTokenSecret  StandardError = "duplicate MFA token secret"
    24  	ErrDuplicateMfaTokenComment StandardError = "duplicate MFA token comment"
    25  
    26  	ErrMfaTokenEmptyAlgorithm   StandardError = "empty MFA token algorithm"
    27  	ErrMfaTokenTypeEmpty        StandardError = "empty MFA token type"
    28  	ErrMfaTokenInvalidType      StandardError = "invalid MFA token type: %s"
    29  	ErrMfaTokenInvalidAlgorithm StandardError = "invalid MFA token algorithm: %s"
    30  	ErrMfaTokenInvalidPeriod    StandardError = "invalid MFA token period: %d"
    31  	ErrMfaTokenInvalidDigits    StandardError = "invalid MFA token digits: %d"
    32  	ErrMfaTokenInvalidPasscode  StandardError = "invalid MFA token passcode: %v"
    33  
    34  	ErrWebAuthnRegisterNotFound                          StandardError = "webauthn register not found"
    35  	ErrWebAuthnChallengeNotFound                         StandardError = "webauthn challenge not found"
    36  	ErrWebAuthnParse                                     StandardError = "failed parsing webauthn request: %v"
    37  	ErrWebAuthnEmptyRegisterID                           StandardError = "webauthn register id is empty"
    38  	ErrWebAuthnEmptyRegisterKeyType                      StandardError = "webauthn register key type is empty"
    39  	ErrWebAuthnInvalidRegisterKeyType                    StandardError = "invalid webauthn register key type: %v"
    40  	ErrWebAuthnEmptyRegisterTransport                    StandardError = "webauthn register key transport is empty"
    41  	ErrWebAuthnInvalidRegisterTransport                  StandardError = "invalid webauthn register key transport: %v"
    42  	ErrWebAuthnRegisterAttestationObjectNotFound         StandardError = "webauthn register attestation object not found"
    43  	ErrWebAuthnRegisterAuthDataNotFound                  StandardError = "webauthn register attestation object auth data not found"
    44  	ErrWebAuthnRegisterCredentialDataNotFound            StandardError = "webauthn register attestation object auth data credential not found"
    45  	ErrWebAuthnRegisterEmptyRelyingPartyID               StandardError = "webauthn register attestation object auth data rpIdHash empty"
    46  	ErrWebAuthnRegisterEmptyFlags                        StandardError = "webauthn register attestation object auth data flags empty"
    47  	ErrWebAuthnRegisterPublicKeyNotFound                 StandardError = "webauthn register attestation object auth data credential public key not found"
    48  	ErrWebAuthnRegisterPublicKeyUnsupported              StandardError = "webauthn register attestation object auth data credential public key type %v is unsupported"
    49  	ErrWebAuthnRegisterPublicKeyTypeNotFound             StandardError = "webauthn register attestation object auth data credential public key type not found"
    50  	ErrWebAuthnRegisterPublicKeyAlgorithmUnsupported     StandardError = "webauthn register attestation object auth data credential public key algorithm %v is unsupported"
    51  	ErrWebAuthnRegisterPublicKeyAlgorithmNotFound        StandardError = "webauthn register attestation object auth data credential public key algorithm not found"
    52  	ErrWebAuthnRegisterPublicKeyCurveUnsupported         StandardError = "webauthn register attestation object auth data credential public key curve_type %v is unsupported"
    53  	ErrWebAuthnRegisterPublicKeyTypeAlgorithmUnsupported StandardError = "webauthn register attestation object auth data credential public key type %q and algorithm %q are unsupported"
    54  	ErrWebAuthnRegisterPublicKeyCurveCoord               StandardError = "webauthn register attestation object auth data credential public key curve %v coordinate error: %v"
    55  	ErrWebAuthnRequest                                   StandardError = "webauthn request failed: %v"
    56  	ErrWebAuthnVerifyRequest                             StandardError = "webauthn authentication request failed: %v"
    57  )