fix: encode auth response correctly (when using query in redirect uri)
This commit is contained in:
parent
f345ddd0c5
commit
9472f2a009
2 changed files with 32 additions and 10 deletions
|
@ -77,14 +77,13 @@ func HttpRequest(client *http.Client, req *http.Request, response interface{}) e
|
|||
return nil
|
||||
}
|
||||
|
||||
func URLEncodeResponse(resp interface{}, encoder Encoder) (string, error) {
|
||||
func URLEncodeParams(resp interface{}, encoder Encoder) (url.Values, error) {
|
||||
values := make(map[string][]string)
|
||||
err := encoder.Encode(resp, values)
|
||||
if err != nil {
|
||||
return "", err
|
||||
return nil, err
|
||||
}
|
||||
v := url.Values(values)
|
||||
return v.Encode(), nil
|
||||
return values, nil
|
||||
}
|
||||
|
||||
func StartServer(ctx context.Context, port string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue