mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-30 17:37:25 +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
|
@ -1,18 +1,19 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/pomerium/pomerium/internal/frontend"
|
||||
"github.com/pomerium/pomerium/internal/httputil"
|
||||
"github.com/pomerium/pomerium/internal/urlutil"
|
||||
"github.com/pomerium/pomerium/ui"
|
||||
)
|
||||
|
||||
// DeviceEnrolled displays an HTML page informing the user that they've successfully enrolled a device.
|
||||
func DeviceEnrolled() http.Handler {
|
||||
tpl := template.Must(frontend.NewTemplates())
|
||||
type TemplateData struct{}
|
||||
func DeviceEnrolled(authenticateURL *url.URL, sharedKey []byte) http.Handler {
|
||||
return httputil.HandlerFunc(func(w http.ResponseWriter, r *http.Request) error {
|
||||
return tpl.ExecuteTemplate(w, "device-enrolled.html", TemplateData{})
|
||||
return ui.ServePage(w, r, "DeviceEnrolled", map[string]interface{}{
|
||||
"signOutUrl": urlutil.SignOutURL(r, authenticateURL, sharedKey),
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue