MCPcopy
hub / github.com/minio/minio-go / NewSTSCertificateIdentity

Function NewSTSCertificateIdentity

pkg/credentials/sts_tls_identity.go:91–100  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

89// to the given STS endpoint with the given TLS certificate and retrieves and
90// rotates S3 credentials.
91func 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
103func (i *STSCertificateIdentity) RetrieveWithCredContext(cc *CredContext) (Value, error) {

Callers

nothing calls this directly

Calls 1

NewFunction · 0.70

Tested by

no test coverage detected