proxy: add userinfo and webauthn endpoints

This commit is contained in:
Caleb Doxsey 2022-11-17 08:52:00 -07:00
parent 6b5096b0fe
commit 5d64e158c7
26 changed files with 404 additions and 167 deletions

View file

@ -0,0 +1,22 @@
package handlers
import (
"net/http"
"net/http/httptest"
"testing"
"github.com/stretchr/testify/assert"
)
func TestJWKSHandler(t *testing.T) {
t.Parallel()
t.Run("cors", func(t *testing.T) {
w := httptest.NewRecorder()
r := httptest.NewRequest(http.MethodOptions, "/", nil)
r.Header.Set("Origin", "https://www.example.com")
r.Header.Set("Access-Control-Request-Method", "GET")
JWKSHandler("").ServeHTTP(w, r)
assert.Equal(t, http.StatusNoContent, w.Result().StatusCode)
})
}