Added -rest-token, which will allow command line creation of a REST token.
This commit is contained in:
parent
fcf573e982
commit
7cfc73ea4d
2 changed files with 16 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue