Commit Graph

39 Commits

Author SHA1 Message Date
Emil Velikov
f17c15c9d8 Simplify oauth (#8972)
* Remove unused OauthProvider::GetIdentifier

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

* Reuse gitlab's getAuthData() instead of open-coding it

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

* Remove OauthProvider::GetAuthDataFromJson interface

The data is already available via GetUserFromJson().AuthData

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-26 17:23:13 -07:00
Joram Wilander
85a75526c7 Add more oauth logging and note about GitLab ToS for login (#8949) 2018-06-14 19:27:00 +02:00
Christopher Speller
686c2fbab7 Structured logging (#8673)
* Implementing structured logging

* Changes to en.json to allow refactor to run.

* Fixing global logger

* Structured logger initalization.

* Add caller.

* Do some log redirection.

* Auto refactor

* Cleaning up l4g reference and removing dependancy.

* Removing junk.

* Copyright headers.

* Fixing tests

* Revert "Changes to en.json to allow refactor to run."

This reverts commit fd8249e99b.

* Fixing some auto refactor strangeness and typo.

* Making keys more human readable.
2018-04-27 12:49:45 -07:00
Joram Wilander
4211a2bb3c Fall back to constructured URL for OAuth SSO if SiteURL not set (#8352) 2018-02-23 10:08:35 -05:00
Chris
d44ef7ea67 Remove global site url (#8343)
* remove global site url

* missed one

* revert mysterious change
2018-02-22 18:23:32 -06:00
Chris
1ec295f88c add App.License, remove utils.IsLicensed / utils.License calls (#8203) 2018-02-06 17:25:49 -06:00
Chris
2256e23c9e ABC-153: don't use http redirects with 4xx/5xx status codes (#8178)
* don't use http redirects with 4xx/5xx status codes

* minor html syntax fix
2018-02-02 08:29:11 -05:00
Chris Duarte
27ba68a789 Add Config to disable Auth Transfers. (#7843)
* Add Config to disable Auth Transfers.

* Set config ExperimentalEnableAuthenticationTransfer behind an E20 license restriction
2017-11-28 11:46:48 -08:00
Chris
77a1dc1f2f HTTP client refactor (#7884)
* http client refactor

* simplification
2017-11-22 10:15:03 -05:00
Christopher Speller
3024525c3b Fixing URL encoding of SAML email address when switching to SAML account (#7733) 2017-10-31 10:13:46 -07:00
Chris
7ed011745a Remove more global refs / state (#7723)
* remove more global refs / state

* fix job enterprise initialization

* fix api4 test compilation

* saml api endpoints fix
2017-10-26 15:21:22 -04:00
Chris
2a2af0e390 eliminate more utils.Cfg references (#7701) 2017-10-24 09:00:05 -07:00
Chris
8e19ba029f Reduce utils.Cfg references (#7650)
* app.UpdateConfig method

* test fix

* another test fix

* the config override option as-was is just error prone, remove it for now

* derp
2017-10-18 15:36:43 -07:00
Christopher Speller
3461a7b207 Add back consumeAndClose functionality. (#7608)
* consume bodies for action button integrations, webrtc gateway, oauth
endpoint

* Fixing a couple more places, switching to io.Copy to ioutil.Discard, adding a comment to help prevent future performance regressions
2017-10-12 08:00:53 -07:00
Chris
bff2b5e735 Miscellaneous app cleanup (#7594)
* app cleanup

* whoops, forgot a file

* some minor cleanup

* longer container deadline

* defensive checks
2017-10-09 14:59:48 -07:00
Joram Wilander
f94b807f39 PLT-7782 Fix for OAuth (#7566)
* Fix for oauth

* Fix test
2017-10-04 11:05:36 -04:00
Chris
5e69ce099f Goroutine wranglin (#7556)
* goroutine wranglin

* synchronize WebConn.WritePump
2017-10-03 10:53:53 -05:00
Chris
ac74066f0e remove einterface gets (#7455) 2017-09-19 18:31:35 -05:00
n1aba
5a855e1ca1 Implement update OAuthApp endpoint for APIv4, add test (#7413) 2017-09-18 07:40:41 -04:00
Christopher Speller
29fca51821 Renaming repo 2017-09-06 23:11:59 -07:00
Chris
1adfd0e9be app type transition (#7167) 2017-09-06 17:12:54 -05:00
George Goldberg
e85b5fb988 App: NewLocAppError -> NewAppError (#7327)
* App: NewLocAppError -> NewAppError

* Remove statuscode that got missed.
2017-09-01 11:42:02 -04:00
Christopher Speller
fd1301779f Merge branch 'release-4.1' 2017-08-17 09:35:36 -07:00
Saturnino Abril
6ba6431548 Merge 4.0.3 into release-4.1 (#7169)
* fix dm custom slash command regression (#7008)

* point mattermost-redux to webapp-4.0 latest (#7040)

* If login is using mobile respond with JSON object (#7030)

* Allow regions to be set and honored for S3 driver. (#7010) (#7073)

This is necessary for certain users where
GetBucketLocation API is disabled using IAM
policies. There is a field AmazonS3Region
which we need to re-purpose and use to support
this properly.

Fixes https://github.com/mattermost/platform/issues/6999

* [PLT-7231/PLT-7306] Fix GitLab SSO failure with non-English locale and make config locales more forgiving (#7106)

* make config locales more forgiving by assigning default values

* fix error text

* update per comment

* Minor updates to team

* Another team update
2017-08-11 00:41:10 +08:00
Chris
ffbf8e51fe PLT-6358: Server HTTP client improvements (#6980)
* restrict untrusted, internal http connections by default

* command test fix

* more test fixes

* change setting from toggle to whitelist

* requested ui changes

* add isdefault diagnostic

* fix tests
2017-08-09 13:49:07 -07:00
enahum
fa3dd6a84b If login is using mobile respond with JSON object (#7030) 2017-08-03 02:39:14 +08:00
Joram Wilander
4d45214394 Add more debugging info to server logs for failed OAuth requests (#7039) 2017-08-02 08:05:36 -07:00
JoramWilander
259ad46f30 Minor fix 2017-07-12 16:58:51 -04:00
JoramWilander
15ad24d160 Minor fix 2017-07-06 17:28:38 -04:00
Torsten Juergeleit
fdf1164aee PLT-5705 Created a single source of http.Client creation logic with internet proxy support, reasonable timeouts and optional insecure connections (#6503) 2017-05-31 10:34:05 -04:00
enahum
5f9a28ed6f Ability to use OAuth login from mobile (#6432) 2017-05-17 17:33:44 -04:00
Christopher Speller
9a87bb3af6 Creating common token store and moving email invites and verification to it (#6213) 2017-04-27 10:55:03 -04:00
Joram Wilander
8d1a132eda Fix OAuth SSO first account creation, add mobile support, and fix refresh tokens (#6181) 2017-04-25 09:38:33 -07:00
Joram Wilander
be9624e2ad Implement v4 endpoints for OAuth (#6040)
* Implement POST /oauth/apps endpoint for APIv4

* Implement GET /oauth/apps endpoint for APIv4

* Implement GET /oauth/apps/{app_id} and /oauth/apps/{app_id}/info endpoints for APIv4

* Refactor API version independent oauth endpoints

* Implement DELETE /oauth/apps/{app_id} endpoint for APIv4

* Implement /oauth/apps/{app_id}/regen_secret endpoint for APIv4

* Implement GET /user/{user_id}/oauth/apps/authorized endpoint for APIv4

* Implement POST /oauth/deauthorize endpoint
2017-04-20 09:55:02 -04:00
Joram Wilander
8b8aa2ca3c Refactor OAuth 2.0 code into app layer (#6037) 2017-04-12 16:29:42 -04:00
Harrison Healey
fb6f2a123c PLT-5860 Updated copyright date (#6058)
* PLT-5860 Updated copyright date in about modal

* PLT-5860 Updated copyright notice in JSX files

* PLT-5860 Updated copyright notice in go files

* Fixed misc copyright dates

* Fixed component snapshots
2017-04-12 08:27:57 -04:00
Joram Wilander
dfc6db7374 Refactor switching login type code into app layer and add v4 endpoint (#6000)
* Refactor switching login type code into app layer and add v4 endpoint

* Fix unit test
2017-04-10 08:19:49 -04:00
Joram Wilander
d3a285e64d Migrate functions to app package (#5106)
* Refactor and move session logic into app package

* Refactor email functions into the app package

* Refactor password update into app package

* Migrate user functions to app package

* Move team functions into app package

* Migrate channel functions into app package

* Pass SiteURL through to app functions

* Update based on feedback
2017-01-19 09:00:13 -05:00
Joram Wilander
0e2b321e6f Refactor and migrate more functions out of api into app package (#5063) 2017-01-13 15:17:50 -05:00