github.com/greenpau/go-authcrunch@v1.1.4/pkg/errors/identity_store.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  // Identity Store Errors
    18  const (
    19  	ErrIdentityStoreConfigInvalid StandardError = "invalid identity store config: %v"
    20  
    21  	// Local identity store errors.
    22  	ErrIdentityStoreLocalConfigurePathEmpty    StandardError = "identity store configuration has empty database path"
    23  	ErrIdentityStoreLocalConfigurePathMismatch StandardError = "identity store configuration database path does not match to an existing path in the same realm: %v %v"
    24  
    25  	// LDAP identity store errors.
    26  	ErrIdentityStoreLdapAuthenticateInvalidUserEmail StandardError = "LDAP authentication request contains invalid user email"
    27  	ErrIdentityStoreLdapAuthenticateInvalidUsername  StandardError = "LDAP authentication request contains invalid username"
    28  	ErrIdentityStoreLdapAuthenticateInvalidPassword  StandardError = "LDAP authentication request contains invalid password"
    29  	ErrIdentityStoreLdapAuthFailed                   StandardError = "LDAP authentication failed: %v"
    30  
    31  	// Generic Errors.
    32  	ErrIdentityStoreRequest StandardError = "%s failed: %v"
    33  
    34  	// Config Errors.
    35  	ErrIdentityStoreConfigureEmptyConfig       StandardError = "identity store configuration is empty"
    36  	ErrIdentityStoreConfigureLoggerNotFound    StandardError = "identity store configuration has no logger"
    37  	ErrIdentityStoreInvalidProvider            StandardError = "identity store configuration has invalid provider: %s"
    38  	ErrIdentityStoreConfigureNameEmpty         StandardError = "identity store configuration has empty name"
    39  	ErrIdentityStoreConfigureRealmEmpty        StandardError = "identity store configuration has empty realm"
    40  	ErrIdentityStoreNewConfig                  StandardError = "identity store config %v error: %v"
    41  	ErrIdentityStoreNewConfigInvalidAuthMethod StandardError = "identity store config %v has invalid auth method"
    42  	ErrIdentityStoreConfigureInvalidBaseURL    StandardError = "identity store config %q has invalid base auth url %q: %v"
    43  
    44  	// Authentication Errors.
    45  	ErrIdentityStoreLocalAuthFailed StandardError = "local backed authentication failed: %v"
    46  )