View definition

(*WebFrontEndImpl).NewRegistration

Defined in github.com/letsencrypt/boulder/wfe/wfe.go

Description

NewRegistration is used by clients to submit a new registration/account

Examples

	m := http.NewServeMux()
	wfe.HandleFunc(m, directoryPath, wfe.Directory, "GET")
	wfe.HandleFunc(m, newRegPath, wfe.NewRegistration, "POST")
	wfe.HandleFunc(m, newAuthzPath, wfe.NewAuthorization, "POST")
	wfe.HandleFunc(m, newCertPath, wfe.NewCertificate, "POST")

	result, err := signer.Sign([]byte(`{"resource":"new-reg","contact":["mailto:[email protected]"],"agreement":"` + agreementURL + `"}`))
	test.AssertNotError(t, err, "Failed to sign body")
	wfe.NewRegistration(ctx, newRequestEvent(), responseWriter,
		makePostRequest(result.FullSerialize()))
	assertJSONEquals(t, responseWriter.Body.String(), `{"type":"urn:acme:error:badNonce","detail":"JWS has no anti-replay nonce","status":400}`)

	result, err := signer.Sign([]byte(`{"resource":"new-reg","contact":["mailto:[email protected]"],"agreement":"` + agreementURL + `"}`))
	test.AssertNotError(t, err, "Failed to sign")
	wfe.NewRegistration(ctx, newRequestEvent(), responseWriter, makePostRequest(result.FullSerialize()))

	var reg core.Registration

NewRegistration is referenced in 1 repository

github.com/letsencrypt/boulder