Commit graph

43 commits

Author SHA1 Message Date
Lucas Nicodemus
70dd72443d Update copyright to 2019 again
Fixes #1658, most likely.
2019-03-29 17:16:37 -07:00
Lucas Nicodemus
569b350cea Update to Pryaxis, 2018 part 2
If there's one thing I learned in this exercise, it's that letting
people add random python scripts to the repo like gpltext.py that
promise to be easier than find and replace is a bad idea.
2018-01-01 02:20:56 -07:00
Lucas Nicodemus
332e6b2518 Remove Utils.GetGroup().
This method duplicates Groups.GetGroupByName().
2017-12-29 08:45:29 -07:00
Edgar Luque
6589531868 Renamed TShockAPI.DB 'User' to 'UserAccount' 2017-12-08 01:38:15 +01:00
White
c4a3a9fb67 Updated Copyright for 2017 2017-03-13 12:17:16 +10:30
White
9d4ced58b9 Remove an oversight relating to REST token management 2017-02-02 00:23:12 +10:30
White
26010c0acf Updated REST to use an RNGCryptoServiceProvider for more secure random numbers involved in token generation.
Also removes some unnecessary limitations.
Closes #1388
2017-01-31 11:25:59 +10:30
White
fe670bc18f Fix for null reference exceptions from REST 2017-01-11 19:42:38 +10:30
Lucas Nicodemus
678f6c7cf8
Update to Mintaka (thanks @enerdy) 2016-12-06 17:36:44 -07:00
White
6151c86630 Removed the old REST model.
This includes the following endpoints:
* `/status`
* `/v2/players/read`
* `/v2/server/rawcmd`
2016-10-23 21:52:25 +10:30
Adilson Carvalho
49b4effe74 Changed year to 2016 on all GPL headers 2016-10-16 17:06:02 -02:00
White
e0f5734a08 Removed the long-deprecated /token/create endpoint 2016-04-07 19:04:41 +09:30
White
12ae57dd9c Marked NewToken as obsolete. Fixed route issues with NewTokenV2 2016-04-07 19:01:49 +09:30
George
09a8f95a70 Added rate limiting to RESTful API
Added token bucket and timer to degrade token bucket

Modified REST API rate limiting

Changed limiting to only be on token create and v2 token create
Added config options to choose time limits
Passed HttpContext to the execute method of endpoints

Made blocking failed API logins optional

Changed error codes on failed login to be ambiguous
Added config to decide whether all or failed logins are limited

Changed config variable names

Cleaned up duplicate code in REST rate limiting

Fixed my typo

Changed error 431 to 403
2015-09-24 15:47:46 +01:00
Lucas Nicodemus
37b5a52fdb Move all TShock usages to use User.VerifyPassword() 2015-04-13 11:16:21 -06:00
Lucas Nicodemus
cbce64f1eb Remove more obsolete code; fix tab/space screwup in TSPlayer 2015-02-28 19:37:06 -07:00
Zack
f9bf470b1d Tick version and update copyright 2015-01-28 15:29:13 -05:00
Zack
62108ecd63 Allow rest request handlers access to the request object itself, to allow the plugin more information on who is making the request. Refactored the args for Rest commands to just one delegate, that takes a RestRequestArgs which has verbs, params, request, and tokenData. 2014-08-23 16:08:18 -04:00
Zack
fb451c6d49 Update license header for 2014 2014-07-10 21:48:33 -04:00
Zack Piispanen
811a98bb4c Added Config option for Rest spam. 2013-10-01 01:06:41 -04:00
Zack Piispanen
ba42fb08df Removed ip address from users, as well as changed /user add syntax to be '/user add username password group' instead of colon bullshit. 2013-09-21 17:11:22 -04:00
Zack Piispanen
ef584c62d7 Added Application tokens that can never be deleted, and are loaded either by the command line arg, or the list in the config file. Other plugins can easily add their own tokens into the dictionary as well, however, I believe the config file approach works best for transparency to the user.
Currently, this is an extremely complex looking field in the config file now.  I don't think we should add a placeholder tho as servers wouldn't realize they had a rest token there.  Perhaps when we do a dump of the config file, someone can add the format for this field.

Closes #520
2013-09-17 18:44:58 -04:00
Zack Piispanen
b22457382e remove unused using statements 2013-09-17 02:24:02 -04:00
Zack Piispanen
225668fcdd Some small rest improvements. Use newest TServer binary. 2013-09-16 00:09:29 -04:00
Lucas Nicodemus
ae7ab5f234 Updated copyright information to point to 2013. 2013-08-22 21:51:17 -06:00
Lucas Nicodemus
9470e20423 Line ending normalization to CRLF (Windows) 2013-08-22 21:17:32 -06:00
CoderCow
f8fbe9b5da Added config setting "RestUseNewPermissionModel" to allow switching between the REST permission models for backward compatibility. 2013-08-02 13:01:22 +02:00
CoderCow
0f34aa03e8 Moved all new REST endpoints to "/v3"as "/v2" was incompatible. 2013-08-02 13:01:12 +02:00
CoderCow
9a40c81b49 Fixed all REST endpoints to use RestObjects instead of Dictionaries. 2013-08-02 13:01:06 +02:00
CoderCow
4d95b5594e -Added REST endpoint "/v2/token/destroy/all"
-Added command "/rest destroytokens", "/rest listusers"
2013-07-27 20:57:55 +02:00
CoderCow
d9ff9a6ac5 REST resolves the user's group on each request now. 2013-07-27 20:01:48 +02:00
CoderCow
125884cc4d Fixed broken build due to last commit. 2013-07-26 00:28:49 +02:00
CoderCow
0ea83746cf -Added REST per-endpoint permissions.
-Added REST endpoint "/v2/server/restart".
-Added REST endpoint "/v2/server/reload".
-Added REST endpoint "/v3/server/rawcmd", will output all returned lines as an array instead.
-Added "uptime", "serverpassword", "rules/ServerSideInventory" fields to REST endpoint "/v2/server/status".
-REST requests are now logged.
-Endpoint "/v2/server/rawcmd" does now check whether the user has the sufficient permission to execute the command.
-Fixed Config.EnableTokenEndpointAuthentication not working properly before.
-Removed obsolete "api" permission (only "restapi" now).
2013-07-25 19:52:12 +02:00
Lucas Nicodemus
8d5cdf04a8 Update copyright to reflect actual year date. 2012-04-24 12:45:46 -06:00
Lucas Nicodemus
7cfc73ea4d Added -rest-token, which will allow command line creation of a REST token. 2012-02-04 20:09:18 -07:00
Lucas Nicodemus
5d61a56fcd Add new REST endpoint:
- /v2/token/password?username={user}

TSHOCKPLUGINS-1 #resolve #time 5m #comment Deprecating old token create syntax, new endpoint added as a replacement.
2012-01-03 15:18:05 -07:00
Lucas Nicodemus
bf9d0137f1 Added any missing license headers to all files 2012-01-01 03:06:48 -07:00
Lucas Nicodemus
c6abbfe4d2 ReSharper code reformat to match naming conventions and stuff 2011-12-30 14:38:04 -07:00
Zidonuke
34efba9c1f Changed hack detection to allow future permissions overrides, now prevents hack clients modding max hp while online. 2011-12-28 21:03:29 -05:00
high
a5550ad3f7 Fixed typo 2011-09-25 18:34:28 -04:00
high
f949738db9 Added config options for RestApi
-IP now changes RestApi listening ip.
2011-09-05 14:33:37 -04:00
high
b7fd7f1953 Merge branch 'general-devel-rest' of github.com:TShock/TShock into general-devel-rest 2011-09-05 14:12:59 -04:00
Lucas Nicodemus
f87ff40260 Moved rest files around a bit 2011-09-05 12:09:23 -06:00
Renamed from TShockAPI/SecureRest.cs (Browse further)