Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidJwtToken = errors.New("invalid JWT token") ErrKeyIDNotFound = errors.New("key ID not found") ErrInvalidGrantToken = errors.New("invalid grant token") ErrInvalidRegistrationToken = errors.New("invalid registration token") ErrExpiredRegistrationToken = errors.New("registration token is expired") ErrInvalidAddress = errors.New("invalid address") ErrInvalidKeyID = errors.New("invalid key ID") ErrInvalidPublicKey = errors.New("invalid public key") ErrInvalidPrivateKey = errors.New("invalid private key") ErrInvalidIssuer = errors.New("invalid issuer") ErrUnknownIssuer = errors.New("no corresponding key pair for issuer") ErrNoIssuerInClaim = errors.New("no issuer was provided in the claim") ErrBadIssuer = errors.New("the issuer provided in the claim does not match the trust") ErrNoKeyIDInHeader = errors.New("no key ID (kid) found in token header") )
Errors
Functions ¶
This section is empty.
Types ¶
type KeyPair ¶
type KeyPair struct { ID string `json:"id" yaml:"id"` KeyID string `json:"key_id" yaml:"key_id"` Issuer string `json:"issuer" yaml:"issuer"` PrivateKey string `json:"private_key" yaml:"private_key"` PublicKey string `json:"public_key" yaml:"public_key"` }
KeyPair a file containing the trust information
type Notification ¶
type Notification struct { ID string Topic string Event string Data string Source string ExpiresAt int64 }
Notification an event message
type StoredData ¶
StoredData data stored in the store
type Trust ¶
type Trust struct { ID string `json:"id" yaml:"id"` KeyID string `json:"key_id" yaml:"key_id"` TrusteeAddr string `json:"trustee_addr" yaml:"trustee_addr"` Disabled bool `json:"disabled" yaml:"disabled"` Issuer string `json:"issuer" yaml:"issuer"` }
Trust a trust record
type TrustGrantToken ¶
type TrustGrantToken struct { ID string `json:"id" yaml:"id"` GrantToken string `json:"grant_token" yaml:"grant_token"` ExpiresAt int64 `json:"expires_at" yaml:"expires_at"` Issuer string `json:"issuer" yaml:"issuer"` }
TrustGrantToken a trust grant token
func (*TrustGrantToken) Validate ¶
func (c *TrustGrantToken) Validate() error
Validate the registration token
type TrustRequest ¶
type TrustRequest struct { GrantToken string `json:"grant_token" yaml:"grant_token"` KeyID string `json:"key_id" yaml:"key_id"` TrusteeAddr string `json:"trustee_addr" yaml:"trustee_addr"` Issuer string `json:"issuer" yaml:"issuer"` }
TrustRequest a request for a trust to be granted
func (*TrustRequest) Validate ¶
func (c *TrustRequest) Validate() error
Validate validates a trust request
Click to show internal directories.
Click to hide internal directories.