When setting up authentication for Custom Actions, you can select to use credentials of an existing synapse. In order to make this work you need to configure the getHeaders method that returns a dictionary of headers that include credentials. Method will not receive any arguments and is only expected to return the dict.
getHeaders can access the persisting connection object, allowing you to retrieve any stored credentials from the authConfig object. Please note that the method currently only supports credentials passed in headers.
If the end system sends credentials in the URL, you will need to use the Service Credentials Tokens (find more information in our article: Service Credentials Tokens).
Example Code
def getHeaders(self) -> dict[str, str]: return {'Authorization': f'Bearer {self.connection.authConfig.accessToken}'}