// ========================LICENSE_START=================================
// O-RAN-SC
// %%
-// Copyright (C) 2022: Nordix Foundation
+// Copyright (C) 2022-2023: Nordix Foundation
+// Copyright (C) 2024: OpenInfra Foundation Europe
// %%
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
return sendCoreError(ctx, http.StatusBadRequest, fmt.Sprintf(errMsg, err))
}
- err = s.keycloak.AddClient(apiInvokerId, "invokerrealm")
- if err != nil {
- return sendCoreError(ctx, http.StatusBadRequest, fmt.Sprintf(errMsg, err))
- }
-
uri := ctx.Request().Host + ctx.Request().URL.String()
ctx.Response().Header().Set(echo.HeaderLocation, ctx.Scheme()+`://`+path.Join(uri, apiInvokerId))
}
if ss, ok := s.trustedInvokers[apiInvokerId]; ok {
- securityInfoCopy := s.revokeTrustedInvoker(&ss, notification, apiInvokerId)
+ securityInfoCopy := s.revokeTrustedInvoker(&ss, notification)
if len(securityInfoCopy) == 0 {
s.deleteTrustedInvoker(apiInvokerId)
}
-func (s *Security) revokeTrustedInvoker(ss *securityapi.ServiceSecurity, notification securityapi.SecurityNotification, apiInvokerId string) []securityapi.SecurityInformation {
+func (s *Security) revokeTrustedInvoker(ss *securityapi.ServiceSecurity, notification securityapi.SecurityNotification) []securityapi.SecurityInformation {
data, _ := copystructure.Copy(ss.SecurityInfo)
securityInfoCopy, _ := data.([]securityapi.SecurityInformation)