You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/internal/auth/oidc/state.go

22 lines
507 B

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
}
}