Commit graph

139 commits

Author SHA1 Message Date
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
f264e2b060
Add parity in REST /world/meteor with /dropmeteor functionality
See #1361

It looks like we're setting spawnMeteor before executing WorldGen.dropMeteor()
in the command but not in the REST API. This makes the two code paths
behave the same.
2017-01-10 13:17:31 -07:00
White
24da389050 Re-added /status and added mute bool to /v3/players/read.
`/status` is now a root endpoint and will always point to `/v2/server/status` with an added `upgrade` field describing the route to the latest status endpoint.
Closes #1358. Closes #1348
2016-12-31 11:55:10 +10:30
Lucas Nicodemus
678f6c7cf8
Update to Mintaka (thanks @enerdy) 2016-12-06 17:36:44 -07:00
Zaicon Kiroshu
50d8b0db30 1.3.4.3 Update (API 1.26) 2016-11-19 17:05:08 -06:00
Lucas Nicodemus
1328d71fdc Merge pull request #1317 from DogooFalchion/motd
Update MotD file parsing to convert color formats into smart text.
2016-10-23 19:27:52 -06: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
DogooFalchion
a2003f130b Do not append Tshock to the MotD path. 2016-10-22 19:03:32 -04:00
DogooFalchion
6242a54603 Update references to MOTD to point to the variable, instead of having magic strings. 2016-10-22 17:37:00 -04:00
Adilson Carvalho
49b4effe74 Changed year to 2016 on all GPL headers 2016-10-16 17:06:02 -02:00
Lucas Nicodemus
f8039c8f80 Rest API uses 'permissions' on /v2/groups/update
Arguably this should be a change to a new API version, but the
current functionality is broken so this just kinda fixes that.

Fixes #1292
2016-10-05 08:28:01 -06:00
ProfessorXZ
05a4e025f7 Added the Registered property to REST's players/read endpoints 2016-08-30 09:16:01 +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
Patrikk
4f914fc4c9 Adding exception at used REST port problem 2015-07-06 12:36:48 +01:00
Enerdy
597322217d Fix more broken calls. 2015-07-04 16:17:31 +01:00
White
dd7ad78d3f Adds a User object to TSPlayer 2015-04-29 17:24:20 +09:30
Lucas Nicodemus
37b5a52fdb Move all TShock usages to use User.VerifyPassword() 2015-04-13 11:16:21 -06:00
Lucas Nicodemus
6fe33b5c43 /v2/groups/create uses non-deprecated AddGroup call
This should have no functional change that's negative. The previous
method only returned errors based on exceptions, so switching does
nothing except remove deprecated code.
2015-04-13 00:04:59 -06:00
Lucas Nicodemus
c6fdd89148 Remove 'ass' and unused 'appName' for 'assembly' 💩 2015-04-13 00:00:55 -06:00
Lucas Nicodemus
417ffbc740 Updated XML documentation for several methods 2015-04-12 23:39:04 -06:00
Zack Piispanen
904c44a1b6 Fix UseServerName config options, to now work properly. Remove duplicate unused code. Ensure that everywhere we use Main.WorldName, we are sending the config server name. 2015-04-09 22:58:32 -04:00
Zack Piispanen
aaf18626e0 Finish documentation and update the doc generation to include the new attributes. Yay~ 2015-04-05 19:31:11 -04:00
Zack Piispanen
f60ec96888 Next block of documentation. 2015-04-05 19:13:24 -04:00
Zack Piispanen
2888bc5fe4 Add next block of documentation, change some names of the routes using verbs to better tell what that verb is used for. 2015-04-05 18:50:21 -04:00
Zack Piispanen
20e39f331f More documentation, removed deprecated from one description because there are too many deprecated methods :( 2015-04-05 18:37:06 -04:00
Zack Piispanen
00f202c94c Added next block of rest documentation. 2015-04-05 18:28:54 -04:00
Zack Piispanen
eeae66ed7e Added rest documentation for the second set of rest calls. 2015-04-05 18:08:48 -04:00
Zack Piispanen
d04b2051b2 Change static readonly fields in RestManager to const, as a const is a static readonly field, and allows us to use them in the rest documentation attributes.
Added more documentation, as it might be useful to know what each argument is for, and what type it is expected to be.
Documented the first block of rest commands.
2015-04-05 17:44:27 -04:00
Zack Piispanen
05c127f20c Add dumping of RestHandlers, to sorta maybe create a little documentation on a system we've never documented. 2015-04-04 01:40:30 -04:00
Lucas Nicodemus
cbce64f1eb Remove more obsolete code; fix tab/space screwup in TSPlayer 2015-02-28 19:37:06 -07:00
Zack
68afd6fcc6 Make sure to write the correct number of bytes, as UTF8 can and most likely will be more than one byte per char.
Fixes #863
2015-02-22 16:07:59 -05:00
Zack
f8a513d9da Change output of REST to UTF8, which is what Terraria uses behind the scenes. Also changed content type to include the encoding. Fixes #858 2015-02-21 19:00:57 -05:00
Zack
f9bf470b1d Tick version and update copyright 2015-01-28 15:29:13 -05:00
Zack Piispanen
c29f01b959 Add new rest endpoint /v3/players/read to read the players inventory, armor, and dyes. Armor contains both armor and accessories, as well as vanity. Dyes contain all 8 dye slots. Closes #835 2014-09-09 04:03:31 -04: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
MarioE
1293b8a3f9 Merge pull request #828 from Ijwu/general-devel
Bugfix in /v2/world/butcher endpoint
2014-07-20 20:33:48 -04:00
Ijwu
5463adfce8 Bugfix in /v2/world/butcher endpoint
killfriendly parameter now does something.
2014-07-20 20:20:42 -04:00
Zack
fb451c6d49 Update license header for 2014 2014-07-10 21:48:33 -04:00
Zack
915e791406 Initial work to move all Server Side Character code to its own module. 2014-07-10 21:09:32 -04:00
Laurens de Voogd
7c7f6007b7 Changed version to serverversion 2014-06-25 00:28:51 +02:00
Laurens de Voogd
28fd3bbc56 Removed the space between tshock and version
Because Endimmion told me to
2014-06-25 00:27:03 +02:00
Laurens de Voogd
bf60e34b18 Added TShock version 2014-06-25 00:24:20 +02:00
Laurens de Voogd
59ebe35650 Added server version 2014-06-17 17:37:53 +02:00
MarioE
8c4401219c Fix /status if using old REST model 2013-11-11 11:50:11 -05:00
Zack Piispanen
ec9cb09cd8 REST status or v2/server/status now checks for a permission to display ips to the caller. The only way to get this enabled is to use securetokenendpoint config option.
Refactored a tsplayer method.
2013-10-19 22:13:09 -04:00
Zack Piispanen
e246183108 Add prefix, suffix, color to group command.
Fix stupid chat color getter returning the hex color.
2013-10-02 17:47:16 -04:00