...
1 package auth
2
3 import (
4 "github.com/aws/smithy-go/auth"
5 smithyhttp "github.com/aws/smithy-go/transport/http"
6 )
7
8
9
10
11
12 type HTTPAuthScheme struct {
13 schemeID string
14 signer smithyhttp.Signer
15 }
16
17 var _ smithyhttp.AuthScheme = (*HTTPAuthScheme)(nil)
18
19
20 func NewHTTPAuthScheme(schemeID string, signer smithyhttp.Signer) *HTTPAuthScheme {
21 return &HTTPAuthScheme{
22 schemeID: schemeID,
23 signer: signer,
24 }
25 }
26
27
28 func (s *HTTPAuthScheme) SchemeID() string {
29 return s.schemeID
30 }
31
32
33 func (s *HTTPAuthScheme) IdentityResolver(o auth.IdentityResolverOptions) auth.IdentityResolver {
34 return o.GetIdentityResolver(s.schemeID)
35 }
36
37
38 func (s *HTTPAuthScheme) Signer() smithyhttp.Signer {
39 return s.signer
40 }
41
42
43 func (s *HTTPAuthScheme) WithSigner(signer smithyhttp.Signer) *HTTPAuthScheme {
44 return NewHTTPAuthScheme(s.schemeID, signer)
45 }
46
View as plain text