mirror of
https://github.com/go-acme/lego.git
synced 2024-12-22 07:12:22 +02:00
regru: update authentication method (#2325)
This commit is contained in:
parent
815c61ac07
commit
f8db554820
@ -76,17 +76,14 @@ func (c Client) AddTXTRecord(ctx context.Context, domain, subDomain, content str
|
||||
func (c Client) doRequest(ctx context.Context, request any, fragments ...string) (*APIResponse, error) {
|
||||
endpoint := c.baseURL.JoinPath(fragments...)
|
||||
|
||||
query := endpoint.Query()
|
||||
query.Set("username", c.username)
|
||||
query.Set("password", c.password)
|
||||
endpoint.RawQuery = query.Encode()
|
||||
|
||||
inputData, err := json.Marshal(request)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create input data: %w", err)
|
||||
}
|
||||
|
||||
data := url.Values{}
|
||||
data.Set("username", c.username)
|
||||
data.Set("password", c.password)
|
||||
data.Set("input_data", string(inputData))
|
||||
data.Set("input_format", "json")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user