Files
threshold/internal/auth/ldap/state.go
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
642 B
Go
Raw Normal View History

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package ldap
// AuthMethodState defines the possible states for an ldap auth method
type AuthMethodState string
const (
UnknownState AuthMethodState = "unknown"
InactiveState AuthMethodState = "inactive"
ActivePrivateState AuthMethodState = "active-private"
ActivePublicState AuthMethodState = "active-public"
)
func validState(s string) bool {
st := AuthMethodState(s)
switch st {
case InactiveState, ActivePrivateState, ActivePublicState:
return true
default:
return false
}
}
func (s AuthMethodState) String() string {
return string(s)
}