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

Function NewCustomTokenCredentials

pkg/credentials/sts_custom_identity.go:156–166  ·  view source on GitHub ↗

NewCustomTokenCredentials - returns credentials using the AssumeRoleWithCustomToken STS API.

(stsEndpoint, token, roleArn string, optFuncs ...CustomTokenOpt)

Source from the content-addressed store, hash-verified

154// NewCustomTokenCredentials - returns credentials using the
155// AssumeRoleWithCustomToken STS API.
156func NewCustomTokenCredentials(stsEndpoint, token, roleArn string, optFuncs ...CustomTokenOpt) (*Credentials, error) {
157 c := CustomTokenIdentity{
158 STSEndpoint: stsEndpoint,
159 Token: token,
160 RoleArn: roleArn,
161 }
162 for _, optFunc := range optFuncs {
163 optFunc(&c)
164 }
165 return New(&c), nil
166}
167
168// CustomTokenOpt is a function type to configure the custom-token based
169// credentials using NewCustomTokenCredentials.

Callers

nothing calls this directly

Calls 1

NewFunction · 0.70

Tested by

no test coverage detected