Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package credentials |
||
2 | |||
3 | type BearerTokenCredential struct { |
||
|
|||
4 | BearerToken string |
||
5 | } |
||
6 | |||
7 | // newBearerTokenCredential return a BearerTokenCredential object |
||
8 | func newBearerTokenCredential(token string) *BearerTokenCredential { |
||
9 | return &BearerTokenCredential{ |
||
10 | BearerToken: token, |
||
11 | } |
||
12 | } |
||
13 | |||
14 | // GetAccessKeyID is useless for BearerTokenCredential |
||
15 | func (b *BearerTokenCredential) GetAccessKeyID() (string, error) { |
||
16 | return "", nil |
||
17 | } |
||
18 | |||
19 | // GetAccessSecret is useless for BearerTokenCredential |
||
20 | func (b *BearerTokenCredential) GetAccessSecret() (string, error) { |
||
21 | return "", nil |
||
22 | } |
||
23 | |||
24 | // GetSecurityToken is useless for BearerTokenCredential |
||
25 | func (b *BearerTokenCredential) GetSecurityToken() (string, error) { |
||
26 | return "", nil |
||
27 | } |
||
28 | |||
29 | // GetBearerToken reutrns BearerTokenCredential's BearerToken |
||
30 | func (b *BearerTokenCredential) GetBearerToken() string { |
||
31 | return b.BearerToken |
||
32 | } |
||
33 | |||
34 | // GetType reutrns BearerTokenCredential's type |
||
35 | func (b *BearerTokenCredential) GetType() string { |
||
36 | return "bearer" |
||
37 | } |
||
38 |