You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnnil, fmt.Errorf("rejecting JSON response from server as it was too large or was truncated")
112
133
}
113
-
114
134
returnnil, fmt.Errorf("failed to parse JSON from otherwise successful request to service discovery endpoint: %s", err)
115
135
}
136
+
varidentityAPI, discoveryContextAPIstring
137
+
for_, svc:=rangediscoveryResp.Services {
138
+
switchsvc.ServiceName {
139
+
caseIdentityServiceName:
140
+
for_, ep:=rangesvc.Endpoints {
141
+
ifep.Type=="main"&&ep.IsActive&&ep.API!="" {
142
+
identityAPI=ep.API
143
+
break
144
+
}
145
+
}
146
+
caseDiscoveryContextServiceName:
147
+
for_, ep:=rangesvc.Endpoints {
148
+
ifep.Type=="main"&&ep.IsActive&&ep.API!="" {
149
+
discoveryContextAPI=ep.API
150
+
break
151
+
}
152
+
}
153
+
}
154
+
}
116
155
117
-
ifservices.Identity.API=="" {
118
-
returnnil, fmt.Errorf("didn't find %s in service discovery response, which may indicate a suspended tenant; unable to detect CyberArk Identity API URL", IdentityServiceName)
156
+
ifidentityAPI=="" {
157
+
returnnil, fmt.Errorf("didn't find %s in service discovery response, "+
158
+
"which may indicate a suspended tenant; unable to detect CyberArk Identity API URL", IdentityServiceName)
119
159
}
160
+
//TODO: Should add a check for discoveryContextAPI too?
0 commit comments