Saloon has optional authenticator classes to help you with the most common types of authentication. These are classes that can be used on your connector or request.
The TokenAuthenticator class can be used to add a Authorization: Bearer header to the request. Just extend the defaultAuth method and return the authenticator class.
The BasicAuthenticator class can be used to add a Authorization: Basic header to the request. Just extend the defaultAuth method and return the authenticator class.
The CertificateAuthenticator class can be used to authenticate with a custom client-side certificate. An optional password can be provided. Just extend the defaultAuth method and return the authenticator class.
You may need to use multiple authenticator classes together, like a certificate and an authorization token. You can use the MultiAuthenticator class for this scenario.
If your API integration requires a more complicated authentication process, you can create your own authenticator classes which can be used on your connector. This helps abstract any complicated logic away from the connector keeping it tidy.