Documentation ¶
Index ¶
- func AddAudCommit(idtTemp *IDTokenTemplate, cicHash string)
- func AddNonceCommit(idtTemp *IDTokenTemplate, cicHash string)
- func CreateES256KeySet(issuer string, numKeys int) (map[string]crypto.Signer, map[string]discover.PublicKeyRecord, error)
- func CreateKeySet(issuer string, alg string, numKeys int) (map[string]crypto.Signer, map[string]discover.PublicKeyRecord, error)
- func CreateRS256KeySet(issuer string, numKeys int) (map[string]crypto.Signer, map[string]discover.PublicKeyRecord, error)
- func NoClaimCommit(idtTemp *IDTokenTemplate, cicHash string)
- type CommitmentType
- type IDTokenTemplate
- type MockProviderBackend
- func (o *MockProviderBackend) GetProviderPublicKeySet() map[string]discover.PublicKeyRecord
- func (o *MockProviderBackend) GetProviderSigningKeySet() map[string]crypto.Signer
- func (o *MockProviderBackend) GetPublicKeyFinder() *discover.PublicKeyFinder
- func (o *MockProviderBackend) RandomSigningKey() (crypto.Signer, string, discover.PublicKeyRecord)
- func (o *MockProviderBackend) RequestTokenOverrideFunc(cicHash string) ([]byte, error)
- func (o *MockProviderBackend) SetIDTokenTemplate(template *IDTokenTemplate)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAudCommit ¶
func AddAudCommit(idtTemp *IDTokenTemplate, cicHash string)
func AddNonceCommit ¶
func AddNonceCommit(idtTemp *IDTokenTemplate, cicHash string)
func CreateES256KeySet ¶
func CreateKeySet ¶
func CreateRS256KeySet ¶
func NoClaimCommit ¶
func NoClaimCommit(idtTemp *IDTokenTemplate, cicHash string)
Types ¶
type CommitmentType ¶
type IDTokenTemplate ¶
type IDTokenTemplate struct { CommitFunc func(*IDTokenTemplate, string) Issuer string Nonce string NoNonce bool Aud string KeyID string NoKeyID bool Alg string NoAlg bool // Even if NOAlg is true, we still need Alg to be set to generate the signature ExtraClaims map[string]any ExtraProtectedClaims map[string]any SigningKey crypto.Signer // The key we will use to sign the ID Token }
func DefaultIDTokenTemplate ¶
func DefaultIDTokenTemplate() IDTokenTemplate
func (*IDTokenTemplate) AddCommit ¶
func (t *IDTokenTemplate) AddCommit(cicHash string)
AddCommit adds the commitment to the CIC to the ID Token. The CommitmentFunc is specified allowing custom commitment functions to be specified
func (*IDTokenTemplate) IssueToken ¶
func (t *IDTokenTemplate) IssueToken() ([]byte, error)
type MockProviderBackend ¶
type MockProviderBackend struct { Issuer string PublicKeyFinder discover.PublicKeyFinder ProviderSigningKeySet map[string]crypto.Signer // kid (keyId) -> signing key ProviderPublicKeySet map[string]discover.PublicKeyRecord // kid (keyId) -> PublicKeyRecord IDTokensTemplate *IDTokenTemplate }
func NewMockProviderBackend ¶
func NewMockProviderBackend(issuer string, numKeys int) (*MockProviderBackend, error)
func (*MockProviderBackend) GetProviderPublicKeySet ¶
func (o *MockProviderBackend) GetProviderPublicKeySet() map[string]discover.PublicKeyRecord
func (*MockProviderBackend) GetProviderSigningKeySet ¶
func (o *MockProviderBackend) GetProviderSigningKeySet() map[string]crypto.Signer
func (*MockProviderBackend) GetPublicKeyFinder ¶
func (o *MockProviderBackend) GetPublicKeyFinder() *discover.PublicKeyFinder
func (*MockProviderBackend) RandomSigningKey ¶
func (o *MockProviderBackend) RandomSigningKey() (crypto.Signer, string, discover.PublicKeyRecord)
func (*MockProviderBackend) RequestTokenOverrideFunc ¶
func (o *MockProviderBackend) RequestTokenOverrideFunc(cicHash string) ([]byte, error)
func (*MockProviderBackend) SetIDTokenTemplate ¶
func (o *MockProviderBackend) SetIDTokenTemplate(template *IDTokenTemplate)
Click to show internal directories.
Click to hide internal directories.