2022-06-14 05:17:11 +00:00
|
|
|
package authentication
|
|
|
|
|
2022-12-17 12:39:24 +00:00
|
|
|
// String returns a string representation of an authentication.Level.
|
|
|
|
func (l Level) String() string {
|
|
|
|
switch l {
|
2022-06-14 05:17:11 +00:00
|
|
|
case NotAuthenticated:
|
|
|
|
return "not_authenticated"
|
|
|
|
case OneFactor:
|
|
|
|
return "one_factor"
|
|
|
|
case TwoFactor:
|
|
|
|
return "two_factor"
|
2022-12-17 12:39:24 +00:00
|
|
|
default:
|
|
|
|
return "invalid"
|
2022-06-14 05:17:11 +00:00
|
|
|
}
|
|
|
|
}
|