[release-11.3.6] Auth: Introduce authn.SSOClientConfig to get client config from SSOSettings service (#103001)

Auth: Introduce authn.SSOClientConfig to get client config from SSOSettings service (#94618)

* wip

* possible solution

* Separate interface for SSO settings clients

* Rename interface

* Fix tests

* Rename

* Change GetClientConfig to comma ok idiom

(cherry picked from commit 50a635bc7e)
This commit is contained in:
Misi
2025-03-27 16:52:53 +01:00
committed by GitHub
parent d3c332171b
commit 34e755d9f1
14 changed files with 156 additions and 39 deletions
+14
View File
@@ -380,6 +380,20 @@ func (s *Service) IsClientEnabled(name string) bool {
return client.IsEnabled()
}
func (s *Service) GetClientConfig(name string) (authn.SSOClientConfig, bool) {
client, ok := s.clients[name]
if !ok {
return nil, false
}
ssoSettingsAwareClient, ok := client.(authn.SSOSettingsAwareClient)
if !ok {
return nil, false
}
return ssoSettingsAwareClient.GetConfig(), true
}
func (s *Service) SyncIdentity(ctx context.Context, identity *authn.Identity) error {
ctx, span := s.tracer.Start(ctx, "authn.SyncIdentity")
defer span.End()