diff options
| author | 2025-11-05 21:58:38 +0100 | |
|---|---|---|
| committer | 2025-11-17 14:12:41 +0100 | |
| commit | d0c551acb5ab79efafd325f5b19c76a3de835356 (patch) | |
| tree | ba9462cdc5081015fbd6bf5d98d9f39334d13207 /vendor/github.com/minio/minio-go/v7/pkg/credentials | |
| parent | [performance] when transforming media, perform read operations of large files... (diff) | |
| download | gotosocial-d0c551acb5ab79efafd325f5b19c76a3de835356.tar.xz | |
[chore] update dependencies (#4542)
- github.com/minio/minio-go/v7: v7.0.95 -> v7.0.97
- github.com/ncruces/go-sqlite3: v0.29.1 -> v0.30.0
- github.com/tdewolff/minify/v2: v2.24.5 -> v2.24.6
- codeberg.org/gruf/go-mmap: fixes build for BSD platforms
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4542
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/pkg/credentials')
5 files changed, 18 insertions, 7 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_aws_credentials.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_aws_credentials.go index c9a52252a..0c83fc7fa 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_aws_credentials.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_aws_credentials.go @@ -18,6 +18,7 @@ package credentials import ( + "encoding/json" "errors" "os" "os/exec" @@ -26,7 +27,6 @@ import ( "time" "github.com/go-ini/ini" - "github.com/minio/minio-go/v7/internal/json" ) // A externalProcessCredentials stores the output of a credential_process diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_minio_client.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_minio_client.go index 398952ee9..b78dcaccf 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_minio_client.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_minio_client.go @@ -18,11 +18,10 @@ package credentials import ( + "encoding/json" "os" "path/filepath" "runtime" - - "github.com/minio/minio-go/v7/internal/json" ) // A FileMinioClient retrieves credentials from the current user's home diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go index edc988467..f4f7c8f7e 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go @@ -20,6 +20,7 @@ package credentials import ( "bufio" "context" + "encoding/json" "errors" "fmt" "io" @@ -30,8 +31,6 @@ import ( "path" "strings" "time" - - "github.com/minio/minio-go/v7/internal/json" ) // DefaultExpiryWindow - Default expiry window. diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_custom_identity.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_custom_identity.go index 162f460ee..e9e7a1151 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_custom_identity.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_custom_identity.go @@ -132,7 +132,7 @@ func (c *CustomTokenIdentity) RetrieveWithCredContext(cc *CredContext) (value Va r := AssumeRoleWithCustomTokenResponse{} if err = xml.NewDecoder(resp.Body).Decode(&r); err != nil { - return + return value, err } cr := r.Result.Credentials diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go index 31fe10ae0..7e80cd6a2 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go @@ -74,6 +74,9 @@ type LDAPIdentity struct { // requested from LDAP. RequestedExpiry time.Duration + // Optional, if empty applies to default config + ConfigName string + // Optional, used for token revokation TokenRevokeType string } @@ -110,6 +113,13 @@ func LDAPIdentityExpiryOpt(d time.Duration) LDAPIdentityOpt { } } +// LDAPIdentityConfigNameOpt sets the config name for requested credentials. +func LDAPIdentityConfigNameOpt(name string) LDAPIdentityOpt { + return func(k *LDAPIdentity) { + k.ConfigName = name + } +} + // NewLDAPIdentityWithSessionPolicy returns new credentials object that uses // LDAP Identity with a specified session policy. The `policy` parameter must be // a JSON string specifying the policy document. @@ -158,6 +168,9 @@ func (k *LDAPIdentity) RetrieveWithCredContext(cc *CredContext) (value Value, er if k.TokenRevokeType != "" { v.Set("TokenRevokeType", k.TokenRevokeType) } + if k.ConfigName != "" { + v.Set("ConfigName", k.ConfigName) + } req, err := http.NewRequest(http.MethodPost, u.String(), strings.NewReader(v.Encode())) if err != nil { @@ -201,7 +214,7 @@ func (k *LDAPIdentity) RetrieveWithCredContext(cc *CredContext) (value Value, er r := AssumeRoleWithLDAPResponse{} if err = xml.NewDecoder(resp.Body).Decode(&r); err != nil { - return + return value, err } cr := r.Result.Credentials |
