mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 02:12:50 +02:00
proxy: add userinfo and webauthn endpoints (#3755)
* proxy: add userinfo and webauthn endpoints * use TLD for RP id * use EffectiveTLDPlusOne * upgrade webauthn * fix test * Update internal/handlers/jwks.go Co-authored-by: bobby <1544881+desimone@users.noreply.github.com> Co-authored-by: bobby <1544881+desimone@users.noreply.github.com>
This commit is contained in:
parent
81053ac8ef
commit
c1a522cd82
33 changed files with 498 additions and 216 deletions
24
internal/handlers/well_known_pomerium_test.go
Normal file
24
internal/handlers/well_known_pomerium_test.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestWellKnownPomeriumHandler(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
t.Run("cors", func(t *testing.T) {
|
||||
authenticateURL, _ := url.Parse("https://authenticate.example.com")
|
||||
w := httptest.NewRecorder()
|
||||
r := httptest.NewRequest(http.MethodOptions, "/", nil)
|
||||
r.Header.Set("Origin", authenticateURL.String())
|
||||
r.Header.Set("Access-Control-Request-Method", "GET")
|
||||
WellKnownPomerium(authenticateURL).ServeHTTP(w, r)
|
||||
assert.Equal(t, http.StatusNoContent, w.Result().StatusCode)
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue