func (le *LetsEncrypt) Authorize(order *acme.Order) (*acme.Order, error) {
	for _, authzURL := range order.AuthzURLs {
		auth, err := le.AcmeClient.GetAuthorization(le.Ctx, authzURL)
		if err != nil {
			continue
		}

		for _, challenge := range auth.Challenges {
			if challenge.Type == "http-01" {
				order, err := le.acceptChallenge(challenge, order)
				if err != nil {
					continue
				}

				return order, nil
			}
		}
	}

	return nil, errCannotFindAuthChallenge
}
// Authorize will get an unauthorized order and tries to authorize it. This is done by asking LetsEncrypt to validate
// the order. This is done by letsencrypt calling our HTTP server on which we respond with a special file.
Authorize will get an unauthorized order and tries to authorize it. This is done by asking LetsEncrypt to validate
the order. This is done by letsencrypt calling our HTTP server on which we respond with a special file.
// Authorize will get an unauthorized order and tries to authorize it . This is done by asking LetsEncrypt to validate // the order . This is done by letsencrypt calling our HTTP server on which we respond with a special file .
func (le *LetsEncrypt) Authorize(order *acme.Order) (*acme.Order, error) {
	for _, authzURL := range order.AuthzURLs {
		auth, err := le.AcmeClient.GetAuthorization(le.Ctx, authzURL)
		if err != nil {
			continue
		}
		for _, challenge := range auth.Challenges {
			if challenge.Type == "http-01" {
				order, err := le.acceptChallenge(challenge, order)
				if err != nil {
					continue
				}
				return order, nil
			}
		}
	}
	return nil, errCannotFindAuthChallenge
}
func ( le * LetsEncrypt ) Authorize ( order * acme . Order ) ( * acme . Order , error ) { for _ , authzURL := range order . AuthzURLs { auth , err := le . AcmeClient . GetAuthorization ( le . Ctx , authzURL ) if err != nil { continue } for _ , challenge := range auth . Challenges { if challenge . Type == " " { order , err := le . acceptChallenge ( challenge , order ) if err != nil { continue } return order , nil } } } return nil , errCannotFindAuthChallenge }
Authorize will get an unauthorized order and tries to authorize it.
Authorize will get an unauthorized order and tries to authorize it .