-
Notifications
You must be signed in to change notification settings - Fork 19
/
credentials.lisp
31 lines (29 loc) · 1023 Bytes
/
credentials.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
(defpackage #:aws-sdk/credentials
(:use #:cl)
(:import-from #:aws-sdk/credentials/base
#:make-credentials
#:credentials
#:retrieve
#:credentials-keys
#:credentials-headers)
(:import-from #:aws-sdk/credentials/env
#:env-provider)
(:import-from #:aws-sdk/credentials/shared
#:shared-provider)
(:import-from #:aws-sdk/credentials/ec2role
#:ec2role-provider)
(:export #:credentials
#:make-credentials
#:default-aws-credentials
#:credentials-keys
#:credentials-headers))
(in-package #:aws-sdk/credentials)
(defvar *chained-providers*
(list (make-instance 'env-provider)
(make-instance 'shared-provider)
(make-instance 'ec2role-provider)))
(defun default-aws-credentials ()
(loop for provider in *chained-providers*
for credentials = (retrieve provider)
when credentials
do (return credentials)))