Add auth host feature

Allow central host for use as base for redirect_uri

Closes #3
This commit is contained in:
Thom Seddon
2018-10-29 17:39:36 +00:00
parent b3716d401e
commit d230572879
5 changed files with 297 additions and 34 deletions

View File

@ -63,6 +63,22 @@ func newHttpRequest(uri string) *http.Request {
return r
}
func qsDiff(one, two url.Values) {
for k, _ := range one {
if two.Get(k) == "" {
fmt.Printf("Key missing: %s\n", k)
}
if one.Get(k) != two.Get(k) {
fmt.Printf("Value different for %s: expected: '%s' got: '%s'\n", k, one.Get(k), two.Get(k))
}
}
for k, _ := range two {
if one.Get(k) == "" {
fmt.Printf("Extra key: %s\n", k)
}
}
}
func TestHandler(t *testing.T) {
fw = &ForwardAuth{
Path: "_oauth",