Auth: Add IsClientEnabled and IsEnabled for the authn.Service and authn.Client interfaces (#86034)
* Add `Service. IsClientEnabled` and `Client.IsEnabled` functions * Implement `IsEnabled` function for authn clients * Implement `IsClientEnabled` function for authn services
This commit is contained in:
@@ -38,6 +38,10 @@ func (c *Basic) Authenticate(ctx context.Context, r *authn.Request) (*authn.Iden
|
||||
return c.client.AuthenticatePassword(ctx, r, username, password)
|
||||
}
|
||||
|
||||
func (c *Basic) IsEnabled() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (c *Basic) Test(ctx context.Context, r *authn.Request) bool {
|
||||
if r.HTTPRequest == nil {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user