Umbraco Authorized Services is an open-source package designed to reduce the effort needed to integrate third party services that require authentication and authorization via an OAuth flow.
With this PR, I have included support for making authorized requests using API keys.
Updated included:
Service detail changes:
Authentication methods: available options are OAuth1, OAuth2 and ApiKey - default value is OAuth2
Additional properties for storing the API key and setting for passing it with each request:
ApiKey
Provisioning settings: Method (query string or HTTP header) and Key (query string name or header name)
Sample endpoint for retrieving YouTube video details.
YouTube service settings.
Authorization status managed depending on the authentication method, based on presence of API key in the settings, or token in the database storage.
If authorized, the Revoke button will be visible only for OAuth methods.
Additional CreateRequestMessage method added, with a new signature where the token is no longer used.
RequestMessage object created based on authentication method, taking into consideration that for API key the URL could already contain query string parameters, so adding the API key would need to be appended accordingly.
Expose method in IAuthorizedServiceCaller for retrieving API key: GetApiKeyAsync. I have implemented the method to run async, as it did not invoke any asynchronous methods in its body.
With this PR, I have included support for making authorized requests using API keys.
Updated included:
OAuth1
,OAuth2
andApiKey
- default value isOAuth2
Revoke
button will be visible only for OAuth methods.CreateRequestMessage
method added, with a new signature where the token is no longer used.RequestMessage
object created based on authentication method, taking into consideration that for API key the URL could already contain query string parameters, so adding the API key would need to be appended accordingly.IAuthorizedServiceCaller
for retrieving API key:GetApiKeyAsync
. I have implemented the method to run async, as it did not invoke any asynchronous methods in its body.