mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-27 23:40:22 +00:00
b3ce6eff97
Bumps the github-dependencies group with 2 updates: [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) and [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go` from 1.47.10 to 1.48.0 - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.47.10...v1.48.0) Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.25.1 to 1.25.3 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.25.1...config/v1.25.3) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
48 lines
1.3 KiB
Go
48 lines
1.3 KiB
Go
package auth
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/aws/smithy-go"
|
|
)
|
|
|
|
// Identity contains information that identifies who the user making the
|
|
// request is.
|
|
type Identity interface {
|
|
Expiration() time.Time
|
|
}
|
|
|
|
// IdentityResolver defines the interface through which an Identity is
|
|
// retrieved.
|
|
type IdentityResolver interface {
|
|
GetIdentity(context.Context, smithy.Properties) (Identity, error)
|
|
}
|
|
|
|
// IdentityResolverOptions defines the interface through which an entity can be
|
|
// queried to retrieve an IdentityResolver for a given auth scheme.
|
|
type IdentityResolverOptions interface {
|
|
GetIdentityResolver(schemeID string) IdentityResolver
|
|
}
|
|
|
|
// AnonymousIdentity is a sentinel to indicate no identity.
|
|
type AnonymousIdentity struct{}
|
|
|
|
var _ Identity = (*AnonymousIdentity)(nil)
|
|
|
|
// Expiration returns the zero value for time, as anonymous identity never
|
|
// expires.
|
|
func (*AnonymousIdentity) Expiration() time.Time {
|
|
return time.Time{}
|
|
}
|
|
|
|
// AnonymousIdentityResolver returns AnonymousIdentity.
|
|
type AnonymousIdentityResolver struct{}
|
|
|
|
var _ IdentityResolver = (*AnonymousIdentityResolver)(nil)
|
|
|
|
// GetIdentity returns AnonymousIdentity.
|
|
func (*AnonymousIdentityResolver) GetIdentity(_ context.Context, _ smithy.Properties) (Identity, error) {
|
|
return &AnonymousIdentity{}, nil
|
|
}
|