Total Lines | 39 |
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 | // GetAccessKeyID reutrns StsTokenCredential's AccessKeyID |
||
18 | func (s *StsTokenCredential) GetAccessKeyID() (string, error) { |
||
19 | return s.AccessKeyID, nil |
||
20 | } |
||
21 | |||
22 | // GetAccessSecret reutrns StsTokenCredential's AccessKeySecret |
||
23 | func (s *StsTokenCredential) GetAccessSecret() (string, error) { |
||
24 | return s.AccessKeySecret, nil |
||
25 | } |
||
26 | |||
27 | // GetSecurityToken reutrns StsTokenCredential's SecurityToken |
||
28 | func (s *StsTokenCredential) GetSecurityToken() (string, error) { |
||
29 | return s.SecurityToken, nil |
||
30 | } |
||
31 | |||
32 | // GetBearerToken is useless StsTokenCredential |
||
33 | func (s *StsTokenCredential) GetBearerToken() string { |
||
34 | return "" |
||
35 | } |
||
36 | |||
37 | // GetType reutrns StsTokenCredential's type |
||
38 | func (s *StsTokenCredential) GetType() string { |
||
39 | return "sts" |
||
40 | } |
||
41 |