12 lines
300 B
Go
12 lines
300 B
Go
package auth
|
|
|
|
// IsConfigAPIKeyAuth reports whether the auth entry is synthesized from config *-api-key lists.
|
|
func IsConfigAPIKeyAuth(auth *Auth) bool {
|
|
if auth == nil {
|
|
return false
|
|
}
|
|
if auth.AuthKind() != AuthKindAPIKey {
|
|
return false
|
|
}
|
|
return auth.AuthSourceKind() == AuthSourceConfig
|
|
}
|