From 3cce2a21da444f5ff0cc87eae86d933a82326383 Mon Sep 17 00:00:00 2001 From: Boku Kihara Date: Fri, 24 May 2024 10:15:20 +0900 Subject: [PATCH] Allow custom providers in provider() type --- README.md | 2 +- src/aws_credentials_provider.erl | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 57eacce..604bcef 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ or a map of the shape: ```erlang #{ - provider_source => Provider :: atom(), + provider_source => Provider :: module(), access_key_id => AccessKey :: binary(), secret_access_key => SecretKey :: binary(), token => Token :: binary(), diff --git a/src/aws_credentials_provider.erl b/src/aws_credentials_provider.erl index 335cfd5..9ea7430 100644 --- a/src/aws_credentials_provider.erl +++ b/src/aws_credentials_provider.erl @@ -1,7 +1,8 @@ %% @doc This is the behaviour definition for a credential provider %% module and it iterates over a list of providers. You may set the %% `credential_providers` Erlang environment variable if you want to -%% restrict checking only a certain subset of the default list. +%% restrict checking only a certain subset of the default list or +%% if you want to use your own custom providers. %% %% Default order of checking for credentials is: %%
    @@ -34,7 +35,8 @@ -type provider() :: aws_credentials_env | aws_credentials_file | aws_credentials_ecs - | aws_credentials_ec2. + | aws_credentials_ec2 + | module(). -type error_log() :: [{provider(), term()}]. -export_type([ options/0, expiration/0, provider/0 ]).