Documentation ¶
Index ¶
- func Base64Decode(s string) ([]byte, error)
- func Base64Encode(b []byte) string
- func ValidDomain(s string) error
- func VerifyCsr(csr *x509.CertificateRequest) error
- func VerifySignature(sig *Signature, content []byte) (bool, error)
- type AuthorizationMessage
- type AuthorizationRequestMessage
- type BaseMessage
- type CertificateMessage
- type CertificateRequestMessage
- type ChallengeMessage
- type ChallengeRequestMessage
- type ChallengeType
- type DeferMessage
- type ErrorMessage
- type Jwk
- type RevocationMessage
- type RevocationRequestMessage
- type Signature
- type StatusRequestMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
Base64Decode decodes the given string using the standard base64 url decoder but first adds the appropriate number of trailing '=' characters in accordance with the jose specification. http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-2
func Base64Encode ¶
Base64Encode encodes the given data using the standard base64 url encoding format but with all trailing '=' characters ommitted in accordance with the jose specification. http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-2
func ValidDomain ¶
Checks for a valid domain name. Checks lengths, characters, and looks for a valid TLD (according to IANA).
func VerifyCsr ¶
func VerifyCsr(csr *x509.CertificateRequest) error
Types ¶
type AuthorizationMessage ¶
type AuthorizationMessage struct { *BaseMessage // authorization RecoveryToken string `json:"recoveryToken,omitempty"` Identifier string `json:"identifier,omitempty"` Jwk *Jwk `json:"jwk,omitempty"` }
func NewAuthorizationMessage ¶
func NewAuthorizationMessage() AuthorizationMessage
type BaseMessage ¶
type BaseMessage struct {
Type string `json:"type"`
}
type CertificateMessage ¶
type CertificateMessage struct { *BaseMessage // certificate Certificate string `json:"certificate"` Chain []string `json:"chain,omitempty"` Refresh string `json:"refresh,omitempty"` }
func NewCertificateMessage ¶
func NewCertificateMessage() CertificateMessage
type CertificateRequestMessage ¶
type CertificateRequestMessage struct { *BaseMessage // certificateRequest Csr string `json:"csr"` Signature *Signature `json:"signature"` }
type ChallengeMessage ¶
type ChallengeMessage struct { *BaseMessage // challenge SessionId string `json:"sessionID"` Nonce string `json:"nonce"` Challenges []*ChallengeType `json:"challenges"` Combinations [][]*ChallengeType `json:"combinations,omitempty"` }
func NewChallengeMessage ¶
func NewChallengeMessage() ChallengeMessage
type ChallengeRequestMessage ¶
type ChallengeRequestMessage struct { *BaseMessage // challengeRequest Identifier string `json:"identifier"` }
type ChallengeType ¶
type DeferMessage ¶
type DeferMessage struct { *BaseMessage // defer Token string `json:"token"` Interval int64 `json:"interval,omitempty"` Message string `json:"message,omitempty"` }
func NewDeferMessage ¶
func NewDeferMessage() DeferMessage
type ErrorMessage ¶
type ErrorMessage struct { *BaseMessage // error // malformed The request message was malformed // unauthorized The client lacks sufficient authorization // serverInternal The server experienced an internal error // notSupported The request type is not supported // unknown The server does not recognize an ID/token in the request // badCSR The CSR is unacceptable (e.g., due to a short key) Error string `json:"error"` Message string `json:"message,omitempty"` MoreInfo string `json:"moreInfo,omitempty"` }
func NewErrorMessage ¶
func NewErrorMessage() ErrorMessage
type RevocationMessage ¶
type RevocationMessage struct {
*BaseMessage // revocation
}
func NewRevocationMessage ¶
func NewRevocationMessage() RevocationMessage
type RevocationRequestMessage ¶
type RevocationRequestMessage struct { *BaseMessage // revocationRequest Certificate string `json:"certificate"` Signature *Signature `json:"signature"` }
type StatusRequestMessage ¶
type StatusRequestMessage struct { *BaseMessage // statusRequest Token string `json:"token"` }
func NewStatusRequestMessage ¶
func NewStatusRequestMessage() StatusRequestMessage
Click to show internal directories.
Click to hide internal directories.