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:
@@ -320,6 +320,15 @@ func (s *Service) RegisterClient(c authn.Client) {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Service) IsClientEnabled(name string) bool {
|
||||
client, ok := s.clients[name]
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
return client.IsEnabled()
|
||||
}
|
||||
|
||||
func (s *Service) SyncIdentity(ctx context.Context, identity *authn.Identity) error {
|
||||
r := &authn.Request{OrgID: identity.OrgID}
|
||||
// hack to not update last seen on external syncs
|
||||
|
||||
Reference in New Issue
Block a user