mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-02 02:42:57 +02:00
Prototype device authorization flow (core)
This commit is contained in:
parent
56ce79e662
commit
18aed33aa5
2 changed files with 2 additions and 7 deletions
|
@ -69,7 +69,6 @@ func (p *Proxy) registerDashboardHandlers(r *mux.Router, opts *config.Options) *
|
|||
}))
|
||||
|
||||
a.Path("/v1/device_auth").Handler(httputil.HandlerFunc(p.DeviceAuthLogin)).
|
||||
Queries(urlutil.QueryDeviceAuthRouteURI, "").
|
||||
Methods(http.MethodGet, http.MethodPost)
|
||||
|
||||
return r
|
||||
|
@ -169,10 +168,7 @@ func (p *Proxy) DeviceAuthLogin(w http.ResponseWriter, r *http.Request) error {
|
|||
options := p.currentOptions.Load()
|
||||
|
||||
params := url.Values{}
|
||||
routeUri, err := urlutil.ParseAndValidateURL(r.FormValue(urlutil.QueryDeviceAuthRouteURI))
|
||||
if err != nil {
|
||||
return httputil.NewError(http.StatusBadRequest, err)
|
||||
}
|
||||
routeUri := urlutil.GetAbsoluteURL(r)
|
||||
params.Set(urlutil.QueryDeviceAuthRouteURI, routeUri.String())
|
||||
|
||||
idp, err := options.GetIdentityProviderForRequestURL(routeUri.String())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue