1
0
Fork 0
forked from forgejo/forgejo
Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
techknowlogick 2020-12-20 10:36:07 -05:00 committed by GitHub
parent f3c4baa84b
commit e0a84d7880
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 157 additions and 40 deletions

View file

@ -363,6 +363,10 @@ func AcceptTOS(tosURL string) bool { return true }
// Also see Error's Instance field for when a CA requires already registered accounts to agree
// to an updated Terms of Service.
func (c *Client) Register(ctx context.Context, acct *Account, prompt func(tosURL string) bool) (*Account, error) {
if c.Key == nil {
return nil, errors.New("acme: client.Key must be set to Register")
}
dir, err := c.Discover(ctx)
if err != nil {
return nil, err