IndieAuth #25

Merged
h4kor merged 19 commits from auth into master 2022-11-07 19:38:21 +00:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit f2999ba53e - Show all commits

View File

@ -69,6 +69,7 @@ func TestAuthPostCorrectPassword(t *testing.T) {
assertions.AssertStatus(t, rr, http.StatusFound) assertions.AssertStatus(t, rr, http.StatusFound)
assertions.AssertContains(t, rr.Header().Get("Location"), "code=") assertions.AssertContains(t, rr.Header().Get("Location"), "code=")
assertions.AssertContains(t, rr.Header().Get("Location"), "state=test_state") assertions.AssertContains(t, rr.Header().Get("Location"), "state=test_state")
assertions.AssertContains(t, rr.Header().Get("Location"), "iss="+user.FullUrl())
assertions.AssertContains(t, rr.Header().Get("Location"), "http://example.com/response") assertions.AssertContains(t, rr.Header().Get("Location"), "http://example.com/response")
} }

View File

@ -394,8 +394,9 @@ func userAuthVerifyHandler(repo *owl.Repository) func(http.ResponseWriter, *http
} }
http.Redirect(w, r, http.Redirect(w, r,
fmt.Sprintf( fmt.Sprintf(
"%s?code=%s&state=%s", "%s?code=%s&state=%s&iss=%s",
redirect_uri, code, state, redirect_uri, code, state,
user.AuthUrl(),
), ),
http.StatusFound, http.StatusFound,
) )