aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--client.go5
-rw-r--r--messages.go12
3 files changed, 12 insertions, 7 deletions
diff --git a/README.md b/README.md
index c578588..1549b2b 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@
## API
Register(email string) -> Registration(Account, PrivKey, Noncer)
-LoadAccoutn(email string) -> --""--
+LoadAccount(email string) -> --""--
Registration.Recover(?)
Regsitration.Authorize(domain []string) -> ([]Challange, []Combination)
Regsitration.Renew(domain []string) -> ([]Challange, []Combination)
diff --git a/client.go b/client.go
index 0eed71f..9886d82 100644
--- a/client.go
+++ b/client.go
@@ -27,6 +27,11 @@ func Get(uri string, v interface{}) error {
return json.NewDecoder(resp.Body).Decode(v)
}
+// Important header fields
+// Replay-Nonce each request
+// Link links to next stage
+// Retry-After pooling interval
+
func Post(s Signer, uri string, v interface{}) (*http.Response, error) {
body, err := json.Marshal(v)
if err != nil {
diff --git a/messages.go b/messages.go
index 26e4f2b..cb10a79 100644
--- a/messages.go
+++ b/messages.go
@@ -18,7 +18,7 @@ type Directory struct {
// Registration Objects
type Registration struct {
- Resource string `json:"resource"`
+ Resource string `json:"resource"` // new-reg
Contact []string `json:"contact,omitempty"`
Agreement string `json:"agreement,omitempty"`
Authorizations string `json:"authorizations,omitempty"`
@@ -30,11 +30,11 @@ type RegistrationResp struct {
ID int `json:"id"`
Key Key `json:"key"`
Contact []string `json:"contact"`
- InitialIP string `json:"initalIp"`
+ InitialIP string `json:"initalIp"` // not in draft
CreatedAt string `json:"createdAt"` // 2006-01-02T15:04:05.999999999Z
}
-// Key ...
+// Key contains public part of jose.JsonWebKey
type Key struct {
Kty string `json:"kty"` // RSA, EC
E string `json:"e"`
@@ -43,14 +43,14 @@ type Key struct {
// Authorization request
type Authorization struct {
- Resource string `json:"resource"`
+ Resource string `json:"resource"` // new-authz
Identifier Identifier `json:"identifier"`
}
// AuthorizationResp Objects
type AuthorizationResp struct {
Identifier Identifier `json:"identifier"`
- Status string `json:"status,omitemtpy"` // valid
+ Status string `json:"status,omitemtpy"` // e.g. valid
Expires string `json:"expires,omitempty"` // 2006-01-02
Challenges []Challenge `json:"challenges"`
Combinations [][]int `json:"combinations,omitemtpy"`
@@ -65,7 +65,7 @@ type Identifier struct {
// Challege ...
type Challege struct {
Type string `json:"type"` // http-01
- Status string `json:"status"` // valid
+ Status string `json:"status"` // e.g. valid
Validated string `json:"validated"` // 2006-01-02T15:04Z
KeyAuthorization string `json:"keyAuthorization"`
}