Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package credentials |
||
2 | |||
3 | type StsTokenCredential struct { |
||
|
|||
4 | AccessKeyID string |
||
5 | AccessKeySecret string |
||
6 | SecurityToken string |
||
7 | } |
||
8 | |||
9 | func newStsTokenCredential(accessKeyID, accessKeySecret, securityToken string) *StsTokenCredential { |
||
10 | return &StsTokenCredential{ |
||
11 | AccessKeyID: accessKeyID, |
||
12 | AccessKeySecret: accessKeySecret, |
||
13 | SecurityToken: securityToken, |
||
14 | } |
||
15 | } |
||
16 | |||
17 | func (s *StsTokenCredential) GetAccessKeyID() (string, error) { |
||
18 | return s.AccessKeyID, nil |
||
19 | } |
||
20 | |||
21 | func (s *StsTokenCredential) GetAccessSecret() (string, error) { |
||
22 | return s.AccessKeySecret, nil |
||
23 | } |
||
24 | |||
25 | func (s *StsTokenCredential) GetSecurityToken() (string, error) { |
||
26 | return s.SecurityToken, nil |
||
27 | } |
||
28 | |||
29 | func (s *StsTokenCredential) GetBearerToken() string { |
||
30 | return "" |
||
31 | } |
||
32 | |||
33 | func (s *StsTokenCredential) GetType() string { |
||
34 | return "sts" |
||
35 | } |
||
36 |