resolve issue with test endpoint
This commit is contained in:
parent
6700610d35
commit
079f134aa9
@ -102,9 +102,10 @@ void SecurityManager::testVerification(AsyncWebServerRequest *request, JsonDocum
|
|||||||
if (jsonDocument.is<JsonObject>()) {
|
if (jsonDocument.is<JsonObject>()) {
|
||||||
String accessToken = jsonDocument["access_token"];
|
String accessToken = jsonDocument["access_token"];
|
||||||
DynamicJsonDocument parsedJwt(MAX_JWT_SIZE);
|
DynamicJsonDocument parsedJwt(MAX_JWT_SIZE);
|
||||||
if (jwtHandler.parseJWT(accessToken, parsedJwt)){
|
jwtHandler.parseJWT(accessToken, parsedJwt);
|
||||||
|
if (parsedJwt.is<JsonObject>()){
|
||||||
String username = parsedJwt["username"];
|
String username = parsedJwt["username"];
|
||||||
|
Serial.println(username);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// authentication failed
|
// authentication failed
|
||||||
|
Loading…
Reference in New Issue
Block a user