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
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user