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
135
}
113
-
114
136
returnnil, fmt.Errorf("failed to parse JSON from otherwise successful request to service discovery endpoint: %s", err)
115
137
}
138
+
varidentityAPI, discoveryContextAPIstring
139
+
for_, svc:=rangediscoveryResp.Services {
140
+
switchsvc.ServiceName {
141
+
caseIdentityServiceName:
142
+
for_, ep:=rangesvc.Endpoints {
143
+
ifep.Type=="main"&&ep.IsActive&&ep.API!="" {
144
+
identityAPI=ep.API
145
+
break
146
+
}
147
+
}
148
+
caseDiscoveryContextServiceName:
149
+
for_, ep:=rangesvc.Endpoints {
150
+
ifep.Type=="main"&&ep.IsActive&&ep.API!="" {
151
+
discoveryContextAPI=ep.API
152
+
break
153
+
}
154
+
}
155
+
}
156
+
}
116
157
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)
158
+
ifidentityAPI=="" {
159
+
returnnil, fmt.Errorf("didn't find %s in service discovery response, "+
160
+
"which may indicate a suspended tenant; unable to detect CyberArk Identity API URL", IdentityServiceName)
119
161
}
162
+
//TODO: Should add a check for discoveryContextAPI too?
0 commit comments