mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-23 19:49:13 +02:00
Add new device_auth_client_type setting to allow attaching the client_secret to device auth requests
This commit is contained in:
parent
18aed33aa5
commit
b4aa275403
11 changed files with 312 additions and 249 deletions
|
@ -63,14 +63,17 @@ func (p *Proxy) registerDashboardHandlers(r *mux.Router, opts *config.Options) *
|
|||
return nil
|
||||
}
|
||||
return p.routesPortalJSON(w, r)
|
||||
case dashboardPath + "/v1/device_auth":
|
||||
if r.Method != http.MethodGet {
|
||||
http.Error(w, http.StatusText(http.StatusMethodNotAllowed), http.StatusMethodNotAllowed)
|
||||
return nil
|
||||
}
|
||||
return p.DeviceAuthLogin(w, r)
|
||||
}
|
||||
http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
|
||||
return nil
|
||||
}))
|
||||
|
||||
a.Path("/v1/device_auth").Handler(httputil.HandlerFunc(p.DeviceAuthLogin)).
|
||||
Methods(http.MethodGet, http.MethodPost)
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue