Files
threshold/internal/auth/oidc/state.go
T
dd0f34bc35 Add new OIDC auth method. (#1090)
Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-04-08 20:54:32 -04:00

22 lines
507 B
Go

package oidc
// AuthMethodState defines the possible states for an oidc 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
}
}