File tree 3 files changed +21
-5
lines changed
3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,8 @@ namespace Example
333
333
{
334
334
Configuration config = new Configuration ();
335
335
config .BasePath = " https://api.sandbox.immutable.com" ;
336
+ // Configure Bearer token for authorization: BearerAuthWithClient
337
+ config .AccessToken = " YOUR_BEARER_TOKEN" ;
336
338
// Configure API key authorization: ImmutableApiKey
337
339
config .AddApiKey (" x-immutable-api-key" , " YOUR_API_KEY" );
338
340
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
@@ -396,7 +398,7 @@ catch (ApiException e)
396
398
397
399
### Authorization
398
400
399
- [ ImmutableApiKey] ( ../README.md#ImmutableApiKey ) , [ BearerAuth] ( ../README.md#BearerAuth )
401
+ [ BearerAuthWithClient ] ( ../README.md#BearerAuthWithClient ) , [ ImmutableApiKey] ( ../README.md#ImmutableApiKey ) , [ BearerAuth] ( ../README.md#BearerAuth )
400
402
401
403
### HTTP request headers
402
404
Original file line number Diff line number Diff line change @@ -947,6 +947,12 @@ public Immutable.Api.ZkEvm.Client.ApiResponse<RefreshCollectionMetadataResult> R
947
947
localVarRequestOptions . PathParameters . Add ( "chain_name" , Immutable . Api . ZkEvm . Client . ClientUtils . ParameterToString ( chainName ) ) ; // path parameter
948
948
localVarRequestOptions . Data = refreshCollectionMetadataRequest ;
949
949
950
+ // authentication (BearerAuthWithClient) required
951
+ // bearer authentication required
952
+ if ( ! string . IsNullOrEmpty ( this . Configuration . AccessToken ) && ! localVarRequestOptions . HeaderParameters . ContainsKey ( "Authorization" ) )
953
+ {
954
+ localVarRequestOptions . HeaderParameters . Add ( "Authorization" , "Bearer " + this . Configuration . AccessToken ) ;
955
+ }
950
956
// authentication (ImmutableApiKey) required
951
957
if ( ! string . IsNullOrEmpty ( this . Configuration . GetApiKeyWithPrefix ( "x-immutable-api-key" ) ) )
952
958
{
@@ -1037,6 +1043,12 @@ public Immutable.Api.ZkEvm.Client.ApiResponse<RefreshCollectionMetadataResult> R
1037
1043
localVarRequestOptions . PathParameters . Add ( "chain_name" , Immutable . Api . ZkEvm . Client . ClientUtils . ParameterToString ( chainName ) ) ; // path parameter
1038
1044
localVarRequestOptions . Data = refreshCollectionMetadataRequest ;
1039
1045
1046
+ // authentication (BearerAuthWithClient) required
1047
+ // bearer authentication required
1048
+ if ( ! string . IsNullOrEmpty ( this . Configuration . AccessToken ) && ! localVarRequestOptions . HeaderParameters . ContainsKey ( "Authorization" ) )
1049
+ {
1050
+ localVarRequestOptions . HeaderParameters . Add ( "Authorization" , "Bearer " + this . Configuration . AccessToken ) ;
1051
+ }
1040
1052
// authentication (ImmutableApiKey) required
1041
1053
if ( ! string . IsNullOrEmpty ( this . Configuration . GetApiKeyWithPrefix ( "x-immutable-api-key" ) ) )
1042
1054
{
Original file line number Diff line number Diff line change @@ -541,6 +541,8 @@ paths:
541
541
security :
542
542
- ImmutableApiKey :
543
543
- refresh:metadata
544
+ - BearerAuthWithClient :
545
+ - refresh:metadata
544
546
- BearerAuth :
545
547
- refresh:metadata
546
548
summary : Refresh collection metadata
@@ -11746,6 +11748,10 @@ components:
11746
11748
- $ref : ' #/components/schemas/MarketPriceNativeToken'
11747
11749
- $ref : ' #/components/schemas/MarketPriceERC20Token'
11748
11750
securitySchemes :
11751
+ BearerAuthWithClient :
11752
+ bearerFormat : JWT
11753
+ scheme : bearer
11754
+ type : http
11749
11755
BearerAuth :
11750
11756
bearerFormat : JWT
11751
11757
scheme : bearer
@@ -11755,8 +11761,4 @@ components:
11755
11761
name : x-immutable-api-key
11756
11762
type : apiKey
11757
11763
x-go-name : ImmutableApiKey
11758
- BearerAuthWithClient :
11759
- bearerFormat : JWT
11760
- scheme : bearer
11761
- type : http
11762
11764
You can’t perform that action at this time.
0 commit comments