mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 18:33:19 +02:00
frontend: react+mui (#3004)
* mui v5 wip * wip * wip * wip * use compressor for all controlplane endpoints * wip * wip * add deps * fix authenticate URL * fix test * fix test * fix build * maybe fix build * fix integration test * remove image asset test * add yarn.lock
This commit is contained in:
parent
64d8748251
commit
2824faecbf
84 changed files with 13373 additions and 1455 deletions
|
@ -5,12 +5,10 @@ package authorize
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"sync"
|
||||
|
||||
"github.com/pomerium/pomerium/authorize/evaluator"
|
||||
"github.com/pomerium/pomerium/config"
|
||||
"github.com/pomerium/pomerium/internal/frontend"
|
||||
"github.com/pomerium/pomerium/internal/log"
|
||||
"github.com/pomerium/pomerium/internal/telemetry/metrics"
|
||||
"github.com/pomerium/pomerium/internal/telemetry/trace"
|
||||
|
@ -22,7 +20,6 @@ type Authorize struct {
|
|||
state *atomicAuthorizeState
|
||||
store *evaluator.Store
|
||||
currentOptions *config.AtomicOptions
|
||||
templates *template.Template
|
||||
|
||||
dataBrokerInitialSync chan struct{}
|
||||
|
||||
|
@ -37,7 +34,6 @@ func New(cfg *config.Config) (*Authorize, error) {
|
|||
a := Authorize{
|
||||
currentOptions: config.NewAtomicOptions(),
|
||||
store: evaluator.NewStore(),
|
||||
templates: template.Must(frontend.NewTemplates()),
|
||||
dataBrokerInitialSync: make(chan struct{}),
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package authorize
|
|||
|
||||
import (
|
||||
"context"
|
||||
"html/template"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"testing"
|
||||
|
@ -19,7 +18,6 @@ import (
|
|||
"github.com/pomerium/pomerium/authorize/evaluator"
|
||||
"github.com/pomerium/pomerium/config"
|
||||
"github.com/pomerium/pomerium/internal/encoding/jws"
|
||||
"github.com/pomerium/pomerium/internal/frontend"
|
||||
"github.com/pomerium/pomerium/internal/testutil"
|
||||
"github.com/pomerium/pomerium/pkg/grpc/session"
|
||||
"github.com/pomerium/pomerium/pkg/grpc/user"
|
||||
|
@ -114,7 +112,6 @@ func TestAuthorize_deniedResponse(t *testing.T) {
|
|||
}},
|
||||
}},
|
||||
})
|
||||
a.templates = template.Must(frontend.NewTemplates())
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
|
@ -138,7 +135,6 @@ func TestAuthorize_deniedResponse(t *testing.T) {
|
|||
Code: envoy_type_v3.StatusCode(codes.InvalidArgument),
|
||||
},
|
||||
Headers: []*envoy_config_core_v3.HeaderValueOption{
|
||||
mkHeader("Content-Type", "text/html; charset=UTF-8", false),
|
||||
mkHeader("X-Pomerium-Intercepted-Response", "true", false),
|
||||
},
|
||||
Body: "Access Denied",
|
||||
|
@ -155,7 +151,7 @@ func TestAuthorize_deniedResponse(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
assert.Equal(t, tc.want.Status.Code, got.Status.Code)
|
||||
assert.Equal(t, tc.want.Status.Message, got.Status.Message)
|
||||
assert.Equal(t, tc.want.GetDeniedResponse().GetHeaders(), got.GetDeniedResponse().GetHeaders())
|
||||
testutil.AssertProtoEqual(t, tc.want.GetDeniedResponse().GetHeaders(), got.GetDeniedResponse().GetHeaders())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue