fix: do not require remoteOrgID for remote connection creation (#451)

This commit is contained in:
Dane Strandboge
2022-10-28 11:16:53 -05:00
committed by GitHub
parent 121864a550
commit 3285a03e9e
52 changed files with 2942 additions and 587 deletions

View File

@ -112,10 +112,18 @@ type LegacyAuthorizationsApi interface {
PatchLegacyAuthorizationsIDExecuteWithHttpInfo(r ApiPatchLegacyAuthorizationsIDRequest) (Authorization, *_nethttp.Response, error)
/*
* PostLegacyAuthorizations Create a legacy authorization
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @return ApiPostLegacyAuthorizationsRequest
*/
* PostLegacyAuthorizations Create a legacy authorization
* Creates a legacy authorization and returns the legacy authorization.
#### Required permissions
- `write-users USER_ID` if you pass the `userID` property in the request body.
*`USER_ID`* is the ID of the user that you want to scope the authorization to.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @return ApiPostLegacyAuthorizationsRequest
*/
PostLegacyAuthorizations(ctx _context.Context) ApiPostLegacyAuthorizationsRequest
/*
@ -897,9 +905,17 @@ func (r ApiPostLegacyAuthorizationsRequest) ExecuteWithHttpInfo() (Authorization
/*
* PostLegacyAuthorizations Create a legacy authorization
* Creates a legacy authorization and returns the legacy authorization.
#### Required permissions
- `write-users USER_ID` if you pass the `userID` property in the request body.
*`USER_ID`* is the ID of the user that you want to scope the authorization to.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @return ApiPostLegacyAuthorizationsRequest
*/
*/
func (a *LegacyAuthorizationsApiService) PostLegacyAuthorizations(ctx _context.Context) ApiPostLegacyAuthorizationsRequest {
return ApiPostLegacyAuthorizationsRequest{
ApiService: a,
@ -1008,6 +1024,17 @@ func (a *LegacyAuthorizationsApiService) PostLegacyAuthorizationsExecuteWithHttp
newErr.model = &v
return localVarReturnValue, localVarHTTPResponse, newErr
}
if localVarHTTPResponse.StatusCode == 401 {
var v UnauthorizedRequestError
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = _fmt.Sprintf("%s: %s", newErr.Error(), err.Error())
return localVarReturnValue, localVarHTTPResponse, newErr
}
v.SetMessage(_fmt.Sprintf("%s: %s", newErr.Error(), v.GetMessage()))
newErr.model = &v
return localVarReturnValue, localVarHTTPResponse, newErr
}
var v Error
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {