diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-03-13 08:26:23 -0400 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-03-13 12:26:23 +0000 |
commit | 3559fb7959cf008b038239f2e7c43e604c44cd31 (patch) | |
tree | 159fdbb16a169926e0d142aa17d6086fcded62c4 /api4/api.go | |
parent | fe38d6d5bb36e18ddefbe490cc21f48f4f4c8d81 (diff) | |
download | chat-3559fb7959cf008b038239f2e7c43e604c44cd31.tar.gz chat-3559fb7959cf008b038239f2e7c43e604c44cd31.tar.bz2 chat-3559fb7959cf008b038239f2e7c43e604c44cd31.zip |
Implement SAML endpoints for APIv4 (#5671)
* Implement SAML endpoints for APIv4
* Fix unit test
* Only disable encryption when removing puplic/private certs
Diffstat (limited to 'api4/api.go')
-rw-r--r-- | api4/api.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api4/api.go b/api4/api.go index c8c0e170b..71dfbcdf3 100644 --- a/api4/api.go +++ b/api4/api.go @@ -60,6 +60,8 @@ type Routes struct { OAuth *mux.Router // 'api/v4/oauth' + SAML *mux.Router // 'api/v4/saml' + Admin *mux.Router // 'api/v4/admin' System *mux.Router // 'api/v4/system' @@ -127,6 +129,7 @@ func InitApi(full bool) { BaseRoutes.OutgoingHooks = BaseRoutes.Hooks.PathPrefix("/outgoing").Subrouter() BaseRoutes.OutgoingHook = BaseRoutes.OutgoingHooks.PathPrefix("/{hook_id:[A-Za-z0-9]+}").Subrouter() + BaseRoutes.SAML = BaseRoutes.ApiRoot.PathPrefix("/saml").Subrouter() BaseRoutes.OAuth = BaseRoutes.ApiRoot.PathPrefix("/oauth").Subrouter() BaseRoutes.Admin = BaseRoutes.ApiRoot.PathPrefix("/admin").Subrouter() BaseRoutes.System = BaseRoutes.ApiRoot.PathPrefix("/system").Subrouter() @@ -147,6 +150,7 @@ func InitApi(full bool) { InitSystem() InitWebhook() InitPreference() + InitSaml() app.Srv.Router.Handle("/api/v4/{anything:.*}", http.HandlerFunc(Handle404)) |