Documentation
¶
Index ¶
- Variables
- func ConvertBundleToJson(jwks *jose.JSONWebKeySet, options BundleOutputOptions) (string, error)
- func ConvertBundleToKeyIDs(jwks *jose.JSONWebKeySet, options BundleOutputOptions) (string, error)
- func ConvertBundleToSummary(jwks *jose.JSONWebKeySet, options BundleOutputOptions) (string, error)
- func ConvertBundleToYaml(jwks *jose.JSONWebKeySet, options BundleOutputOptions) (string, error)
- type Bundle
- type BundleClient
- type BundleInspector
- type BundleOutputOptions
- type JwkSource
Constants ¶
This section is empty.
Variables ¶
View Source
var FormatMap = map[string]inspect.Formatter[*jose.JSONWebKeySet, BundleOutputOptions]{ "json": {Label: "JSON", Lexer: "json", Converter: ConvertBundleToJson}, "yaml": {Label: "YAML", Lexer: "yaml", Converter: ConvertBundleToYaml}, "summary": {Label: "Summary", Lexer: "text", Converter: ConvertBundleToSummary}, "key-ids": {Label: "Key IDs", Lexer: "text", Converter: ConvertBundleToKeyIDs}, }
These functions assume that the inspector has already checked that the JWKS has at least one key.
Functions ¶
func ConvertBundleToJson ¶
func ConvertBundleToJson(jwks *jose.JSONWebKeySet, options BundleOutputOptions) (string, error)
func ConvertBundleToKeyIDs ¶
func ConvertBundleToKeyIDs(jwks *jose.JSONWebKeySet, options BundleOutputOptions) (string, error)
func ConvertBundleToSummary ¶
func ConvertBundleToSummary(jwks *jose.JSONWebKeySet, options BundleOutputOptions) (string, error)
func ConvertBundleToYaml ¶
func ConvertBundleToYaml(jwks *jose.JSONWebKeySet, options BundleOutputOptions) (string, error)
Types ¶
type BundleClient ¶
func (*BundleClient) GetJWTBundle ¶
func (c *BundleClient) GetJWTBundle(ctx context.Context) error
func (*BundleClient) GetX509Bundle ¶
func (c *BundleClient) GetX509Bundle(ctx context.Context) error
type BundleInspector ¶
type BundleInspector struct {
Location string
OutputFormat string
OutputOptions BundleOutputOptions
}
func (*BundleInspector) Inspect ¶
func (i *BundleInspector) Inspect() (string, error)
type BundleOutputOptions ¶
func (*BundleOutputOptions) InColor ¶
func (o *BundleOutputOptions) InColor() bool
type JwkSource ¶
type JwkSource struct {
// contains filtered or unexported fields
}
A JwkSource is a JWK read from either a file or a URL
func NewJwkSource ¶
Returns a new JwkSource given either a URL or a file path. We first test if it's a URL, and ensure it starts with http(s). This function will normalize and validate the path, but not test for existence or network reachability.
func (*JwkSource) GetJWTBundleForTrustDomain ¶
func (jwk *JwkSource) GetJWTBundleForTrustDomain(trustDomain spiffeid.TrustDomain) (*jwtbundle.Bundle, error)
GetJWTBundleForTrustDomain returns the JWT bundle for the given trust domain. It implements the Source interface. Since we're reading from a JWK, the trust domain is ignored.
Click to show internal directories.
Click to hide internal directories.