Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthOption ¶ added in v0.1.10
type AuthOption func(*AuthOptions)
func WithExpectedAudience ¶ added in v0.1.10
func WithExpectedAudience(x string) AuthOption
func WithExpectedIssuer ¶ added in v0.1.10
func WithExpectedIssuer(x string) AuthOption
func WithHeaderKey ¶ added in v0.1.10
func WithHeaderKey(x string) AuthOption
func WithPrefix ¶ added in v0.1.10
func WithPrefix(x string) AuthOption
type AuthOptions ¶ added in v0.1.10
type AuthOptions struct {
HeaderKey string
Prefix string
ExpectedAudience string
ExpectedIssuer string
}
func ApplyAuthOptions ¶ added in v0.1.10
func ApplyAuthOptions(opts *AuthOptions, modifiers ...AuthOption) AuthOptions
type Client ¶
type DefaultTool ¶ added in v0.1.11
func NewTool ¶
func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool
func (*DefaultTool) AuthenticateOIDC ¶ added in v0.1.11
func (d *DefaultTool) AuthenticateOIDC(ctx context.Context, r *http.Request, opts AuthOptions) (*contract.AuthenticationResult, error)
AuthenticateOIDC performs OIDC authentication using the provided AuthOptions.
func (*DefaultTool) CreateOIDCToken ¶ added in v0.1.11
func (d *DefaultTool) CreateOIDCToken(ctx context.Context, credentialsJSON []byte, audience string) (*oauth2.Token, error)
CreateOIDCToken generates an OIDC token using the given service account credentials.
Click to show internal directories.
Click to hide internal directories.