NewSTSCertificateIdentity returns a STSCertificateIdentity that authenticates to the given STS endpoint with the given TLS certificate and retrieves and rotates S3 credentials.
(endpoint string, certificate tls.Certificate, options ...CertificateIdentityOption)
| 89 | // to the given STS endpoint with the given TLS certificate and retrieves and |
| 90 | // rotates S3 credentials. |
| 91 | func NewSTSCertificateIdentity(endpoint string, certificate tls.Certificate, options ...CertificateIdentityOption) (*Credentials, error) { |
| 92 | identity := &STSCertificateIdentity{ |
| 93 | STSEndpoint: endpoint, |
| 94 | Certificate: certificate, |
| 95 | } |
| 96 | for _, option := range options { |
| 97 | option(identity) |
| 98 | } |
| 99 | return New(identity), nil |
| 100 | } |
| 101 | |
| 102 | // RetrieveWithCredContext is Retrieve with cred context |
| 103 | func (i *STSCertificateIdentity) RetrieveWithCredContext(cc *CredContext) (Value, error) { |