feat: add generate token endpoint and ui for generating tokens for users

This commit is contained in:
proddy
2021-04-21 21:16:38 +02:00
parent 8ea48f7c81
commit a951ebc3ed
11 changed files with 1720 additions and 6 deletions

View File

@@ -25,6 +25,9 @@
#define SECURITY_SETTINGS_FILE "/config/securitySettings.json"
#define SECURITY_SETTINGS_PATH "/rest/securitySettings"
#define GENERATE_TOKEN_SIZE 512
#define GENERATE_TOKEN_PATH "/rest/generateToken"
#if FT_ENABLED(FT_SECURITY)
class SecuritySettings {
@@ -83,6 +86,8 @@ class SecuritySettingsService : public StatefulService<SecuritySettings>, public
FSPersistence<SecuritySettings> _fsPersistence;
ArduinoJsonJWT _jwtHandler;
void generateToken(AsyncWebServerRequest * request);
void configureJWTHandler();
/*