mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-10 23:57:34 +02:00
authenticate: implement hpke-based login flow (#3779)
* urlutil: add time validation functions * authenticate: implement hpke-based login flow * fix import cycle * fix tests * log error * fix callback url * add idp param * fix test * fix test
This commit is contained in:
parent
8d1235a5cc
commit
57217af7dd
25 changed files with 656 additions and 661 deletions
|
@ -25,7 +25,7 @@ func TestAuthorization(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run("public", func(t *testing.T) {
|
||||
client := getClient()
|
||||
client := getClient(t)
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", "https://httpdetails.localhost.pomerium.io", nil)
|
||||
if err != nil {
|
||||
|
@ -43,7 +43,7 @@ func TestAuthorization(t *testing.T) {
|
|||
|
||||
t.Run("domains", func(t *testing.T) {
|
||||
t.Run("allowed", func(t *testing.T) {
|
||||
client := getClient()
|
||||
client := getClient(t)
|
||||
res, err := flows.Authenticate(ctx, client, mustParseURL("https://httpdetails.localhost.pomerium.io/by-domain"),
|
||||
withAPI, flows.WithEmail("user1@dogs.test"))
|
||||
if assert.NoError(t, err) {
|
||||
|
@ -51,7 +51,7 @@ func TestAuthorization(t *testing.T) {
|
|||
}
|
||||
})
|
||||
t.Run("not allowed", func(t *testing.T) {
|
||||
client := getClient()
|
||||
client := getClient(t)
|
||||
res, err := flows.Authenticate(ctx, client, mustParseURL("https://httpdetails.localhost.pomerium.io/by-domain"),
|
||||
withAPI, flows.WithEmail("user1@cats.test"))
|
||||
if assert.NoError(t, err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue