Documentation
¶
Overview ¶
Package helpers hosts shared helper functions reused across packages
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneOAuthToken ¶
CloneOAuthToken returns a shallow copy of the token to prevent callers from modifying shared state
func CloneOIDCClaims ¶
func CloneOIDCClaims(claims *oidc.IDTokenClaims) *oidc.IDTokenClaims
CloneOIDCClaims returns a shallow copy of the claims struct
Types ¶
type HashBuilder ¶
type HashBuilder struct {
// contains filtered or unexported fields
}
HashBuilder provides a composable interface for building content hashes
func NewHashBuilder ¶
func NewHashBuilder() *HashBuilder
NewHashBuilder creates a new hash builder using SHA-256
func (*HashBuilder) Hex ¶
func (h *HashBuilder) Hex() string
Hex returns the hex-encoded hash digest
func (*HashBuilder) WriteSortedMap ¶
func (h *HashBuilder) WriteSortedMap(m map[string]any) *HashBuilder
WriteSortedMap adds a map[string]any to the hash in deterministic order
func (*HashBuilder) WriteStrings ¶
func (h *HashBuilder) WriteStrings(values ...string) *HashBuilder
WriteStrings adds one or more strings to the hash, skipping empty values
func (*HashBuilder) WriteTime ¶
func (h *HashBuilder) WriteTime(t time.Time) *HashBuilder
WriteTime adds a time value to the hash in RFC3339Nano format
func (*HashBuilder) WriteTimePtr ¶
func (h *HashBuilder) WriteTimePtr(t *time.Time) *HashBuilder
WriteTimePtr adds a time pointer to the hash, handling nil values