Documentation ¶
Index ¶
- func CreateAssertion(signingKey dsa.PrivateKey, certificate string, audience string, issuer string, ...) (string, error)
- func CreateCertificate(publicKey dsa.PrivateKey, email string, issuer string, issuedAt time.Time, ...) (string, error)
- type AssertionPayload
- type CertificatePayload
- type CertificatePrincipal
- type CertificatePublicKey
- type WebTokenHeader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAssertion ¶
func CreateCertificate ¶
Types ¶
type AssertionPayload ¶
type AssertionPayload struct { Issuer string `json:"iss"` IssuedAt int64 `json:"iat"` ExpiresAt int64 `json:"exp"` Audience string `json:"aud"` }
func NewAssertionPayload ¶
func (*AssertionPayload) Encode ¶
func (p *AssertionPayload) Encode(signingKey dsa.PrivateKey) (string, error)
type CertificatePayload ¶
type CertificatePayload struct { Principal CertificatePrincipal `json:"principal"` PublicKey CertificatePublicKey `json:"public-key"` Issuer string `json:"iss"` IssuedAt int64 `json:"iat"` Audience string `json:"aud"` ExpiresAt int64 `json:"exp"` }
func NewCertificatePayload ¶
func NewCertificatePayload(publicKey dsa.PrivateKey, email string, issuer string, issuedAt time.Time, expiresAt time.Time) *CertificatePayload
func (*CertificatePayload) Encode ¶
func (p *CertificatePayload) Encode(signingKey dsa.PrivateKey) (string, error)
type CertificatePrincipal ¶
type CertificatePrincipal struct {
Email string `json:"email"`
}
func NewCertificatePrincipal ¶
func NewCertificatePrincipal(email string) *CertificatePrincipal
type CertificatePublicKey ¶
type CertificatePublicKey struct { Algorithm string `json:"algorithm"` Y string `json:"y"` P string `json:"p"` Q string `json:"q"` G string `json:"g"` }
func NewCertificatePublicKey ¶
func NewCertificatePublicKey(key dsa.PrivateKey) *CertificatePublicKey
type WebTokenHeader ¶
type WebTokenHeader struct {
Algorithm string `json:"alg"`
}
Click to show internal directories.
Click to hide internal directories.