From 99bbc824ee4ee87da5aa86451aa9af4a632b59fd Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 20 Dec 2015 16:40:48 +0100 Subject: JsonWebKey --- messages.go | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'messages.go') diff --git a/messages.go b/messages.go index 059de6f..6c9c523 100644 --- a/messages.go +++ b/messages.go @@ -4,6 +4,8 @@ import ( "fmt" "net" "time" + + "github.com/square/go-jose" ) const ( @@ -24,22 +26,15 @@ type Directory struct { // Registration Objects type Registration struct { - Resource Resource `json:"resource"` // new-reg - Contact Contacts `json:"contact,omitempty"` - Agreement string `json:"agreement,omitempty"` - Authorizations string `json:"authorizations,omitempty"` - Certificates string `json:"certificates,omitempty"` - ID int `json:"id,omitempty"` - Key *Key `json:"key,omitempty"` - InitialIP net.IP `json:"initialIp,omitempty"` // not in draft - CreatedAt *time.Time `json:"createdAt,omitempty"` // 2006-01-02T15:04:05.999999999Z -} - -// Key contains public part of jose.JsonWebKey -type Key struct { - Kty string `json:"kty"` // RSA, EC - E string `json:"e"` - N string `json:"n"` + Resource Resource `json:"resource"` // new-reg + Contact Contacts `json:"contact,omitempty"` + Agreement string `json:"agreement,omitempty"` + Authorizations string `json:"authorizations,omitempty"` + Certificates string `json:"certificates,omitempty"` + ID int `json:"id,omitempty"` + Key *jose.JsonWebKey `json:"key,omitempty"` + InitialIP *net.IP `json:"initialIp,omitempty"` // not in draft + CreatedAt *time.Time `json:"createdAt,omitempty"` // 2006-01-02T15:04:05.999999999Z } // Authorization request -- cgit v1.2.3