Documentation
¶
Index ¶
Constants ¶
const (
JTILength = 14
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken string
type AccessTokenCredential ¶ added in v0.28.0
type AccessTokenCredential struct {
Token AccessToken
Type TokenType
}
AccessTokenCredential binds an access token to its authentication scheme.
type AccessTokenCredentialSource ¶ added in v0.28.0
type AccessTokenCredentialSource interface {
AccessTokenCredential(ctx context.Context, client *http.Client) (AccessTokenCredential, error)
}
AccessTokenCredentialSource is implemented by token sources that can return an access token and its authentication scheme atomically.
Token sources without this optional interface retain the SDK's existing DPoP behavior for backwards compatibility.
type AccessTokenSource ¶
type AccessTokenSource interface {
AccessToken(ctx context.Context, client *http.Client) (AccessToken, error)
// MakeToken probably better to use `crypto.AsymDecryption` here than roll our own since this should be
// more closely linked to what happens in KAS in terms of crypto params
MakeToken(func(jwk.Key) ([]byte, error)) ([]byte, error)
}
type TokenAddingInterceptor ¶
type TokenAddingInterceptor struct {
// contains filtered or unexported fields
}
func NewTokenAddingInterceptor
deprecated
func NewTokenAddingInterceptor(t AccessTokenSource, c *tls.Config) TokenAddingInterceptor
Deprecated: NewTokenAddingInterceptor is deprecated, use NewTokenAddingInterceptorWithClient instead. A http client can be constructed using httputil.SafeHTTPClientWithTLSConfig, but should be reused as much as possible.
func NewTokenAddingInterceptorWithClient ¶ added in v0.3.27
func NewTokenAddingInterceptorWithClient(t AccessTokenSource, c *http.Client) TokenAddingInterceptor
func (TokenAddingInterceptor) AddCredentialsConnect ¶ added in v0.4.5
func (i TokenAddingInterceptor) AddCredentialsConnect() connect.UnaryInterceptorFunc
func (TokenAddingInterceptor) GetDPoPToken ¶
func (i TokenAddingInterceptor) GetDPoPToken(path, method, accessToken string) (string, error)
type TokenType ¶ added in v0.28.0
type TokenType string
func TokenTypeFromOAuthTokenType ¶ added in v0.28.0
TokenTypeFromOAuthTokenType returns the authentication scheme required for an OAuth access token. A DPoP token type requires a DPoP proof; all other values use the Bearer scheme.