Added -rest-token, which will allow command line creation of a REST token.

This commit is contained in:
Lucas Nicodemus 2012-02-04 20:09:18 -07:00
parent fcf573e982
commit 7cfc73ea4d
2 changed files with 16 additions and 3 deletions

View file

@ -43,6 +43,10 @@ namespace Rests
Register(new RestCommand("/token/create/{username}/{password}", NewToken) {RequiresToken = false});
Register(new RestCommand("/v2/token/create/{password}", NewTokenV2) { RequiresToken = false });
Register(new RestCommand("/token/destroy/{token}", DestroyToken) {RequiresToken = true});
foreach (KeyValuePair<string, string> t in TShockAPI.TShock.RESTStartupTokens)
{
Tokens.Add(t.Key, t.Value);
}
}
private object DestroyToken(RestVerbs verbs, IParameterCollection parameters)