add support for MFA via callback

This commit is contained in:
Samuel Lorch 2021-09-20 09:20:41 +02:00
parent c3f7f9ac1b
commit 21c833b742
2 changed files with 22 additions and 0 deletions

View file

@ -29,6 +29,8 @@ type Client struct {
userPublicKey string
userID string
mfaCallback func(c *Client, res *APIResponse) error
// Enable Debug Logging
Debug bool
}
@ -147,6 +149,7 @@ func (c *Client) do(ctx context.Context, req *http.Request, v *APIResponse) (*ht
if err != nil {
return resp, fmt.Errorf("Unable to Parse JSON API Response with HTTP Status Code %v: %w", resp.StatusCode, err)
}
return resp, nil
}