Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom providers in provider() type #74

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ or a map of the shape:

```erlang
#{
provider_source => Provider :: atom(),
provider_source => Provider :: module(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The module() type is effectively the same as the atom() type. However, I think this change clarifies that it represents a module name to the user.

access_key_id => AccessKey :: binary(),
secret_access_key => SecretKey :: binary(),
token => Token :: binary(),
Expand Down
6 changes: 4 additions & 2 deletions src/aws_credentials_provider.erl
Original file line number Diff line number Diff line change
@@ -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:
%% <ol>
Expand Down Expand Up @@ -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 ]).

Expand Down
Loading