2626CUSTOM_CREDENTIALS = 'customCredentials'
2727AUTH_PARAMETERS = 'authParameters'
2828O_AUTH_2_CUSTOM_PROPERTIES = 'oAuth2CustomProperties'
29+ ADD_BASIC_AUTH_HEADER = 'addBasicAuthHeader'
2930BASIC_AUTH_CREDENTIALS = 'basicAuthCredentials'
3031API_KEY_CREDENTIALS = 'apiKeyCredentials'
3132O_AUTH_2_CREDENTIALS = 'oAuth2Credentials'
@@ -204,6 +205,7 @@ def __init__(self,
204205 o_auth_2_grant_types_supported : List [OAuth2GrantType ],
205206 o_auth_scopes : List [str ] = None ,
206207 o_auth_2_custom_parameters : List [Oauth2CustomParameter ] = None ,
208+ add_basic_auth_header : bool ,
207209 o_auth_2_content_type : OAuth2ContentType = OAuth2ContentType .URL_ENCODED ,
208210 o_auth_2_method_type : OAuth2MethodType = OAuth2MethodType .HTTP_POST ):
209211 # OAuth Scopes.
@@ -234,6 +236,9 @@ def __init__(self,
234236 # scope defined as the default parameter for AUTH_URL to generate the Authorization code.
235237 # Connector developer doesn't have to define clientId and scope as OAuth2Custom Parameter for AUTH_URL.
236238 self .o_auth_2_custom_parameters = o_auth_2_custom_parameters
239+
240+ # Specifies if clientId and clientSecret should be added to basic auth header
241+ self .add_basic_auth_header = add_basic_auth_header
237242
238243 # OAuth2 content type used for login requests. URL_ENCODED or APPLICATION_JSON.
239244 # Default: URL_ENCODED
@@ -250,6 +255,7 @@ def to_dict(self):
250255 O_AUTH_2_GRANT_TYPES_SUPPORTED : [grant_type .name for grant_type in self .o_auth_2_grant_types_supported ],
251256 O_AUTH_SCOPES : self .o_auth_scopes ,
252257 O_AUTH_2_CUSTOM_PROPERTIES : self .o_auth_2_custom_parameters and [param .to_dict () for param in self .o_auth_2_custom_parameters ],
258+ ADD_BASIC_AUTH_HEADER : self .add_basic_auth_header and [param .to_dict () for param in self .add_basic_auth_header ],
253259 O_AUTH_2_CONTENT_TYPE : self .o_auth_2_content_type .name ,
254260 O_AUTH_2_METHOD_TYPE : self .o_auth_2_method_type .name }
255261
0 commit comments