1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-28 03:28:13 +00:00
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
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