mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: add endpoints to list all authed external apps (#10944)
* feat: add endpoints to list all authed external apps Listing the apps allows users to auth to external apps without going through the create workspace flow.
This commit is contained in:
@ -660,14 +660,21 @@ func New(options *Options) *API {
|
||||
r.Get("/{fileID}", api.fileByID)
|
||||
r.Post("/", api.postFile)
|
||||
})
|
||||
r.Route("/external-auth/{externalauth}", func(r chi.Router) {
|
||||
r.Route("/external-auth", func(r chi.Router) {
|
||||
r.Use(
|
||||
apiKeyMiddleware,
|
||||
httpmw.ExtractExternalAuthParam(options.ExternalAuthConfigs),
|
||||
)
|
||||
r.Get("/", api.externalAuthByID)
|
||||
r.Post("/device", api.postExternalAuthDeviceByID)
|
||||
r.Get("/device", api.externalAuthDeviceByID)
|
||||
// Get without a specific external auth ID will return all external auths.
|
||||
r.Get("/", api.listUserExternalAuths)
|
||||
r.Route("/{externalauth}", func(r chi.Router) {
|
||||
r.Use(
|
||||
httpmw.ExtractExternalAuthParam(options.ExternalAuthConfigs),
|
||||
)
|
||||
r.Delete("/", api.deleteExternalAuthByID)
|
||||
r.Get("/", api.externalAuthByID)
|
||||
r.Post("/device", api.postExternalAuthDeviceByID)
|
||||
r.Get("/device", api.externalAuthDeviceByID)
|
||||
})
|
||||
})
|
||||
r.Route("/organizations", func(r chi.Router) {
|
||||
r.Use(
|
||||
|
Reference in New Issue
Block a user