Framework update

This commit is contained in:
stephb9959
2022-01-10 14:14:07 -08:00
parent 36e16e3c8e
commit 76175d8bbb
4 changed files with 36 additions and 22 deletions

View File

@@ -19,8 +19,8 @@
namespace OpenWifi {
void RESTAPI_oauth2_handler::DoGet() {
bool Expired = false;
if (!IsAuthorized(Expired)) {
bool Expired = false, Contacted = false;
if (!IsAuthorized(Expired, Contacted)) {
if(Expired)
return UnAuthorized(RESTAPI::Errors::ExpiredToken,EXPIRED_TOKEN);
return UnAuthorized(RESTAPI::Errors::MissingAuthenticationInformation, INVALID_TOKEN);
@@ -38,8 +38,8 @@ namespace OpenWifi {
}
void RESTAPI_oauth2_handler::DoDelete() {
bool Expired = false;
if (!IsAuthorized(Expired)) {
bool Expired = false, Contacted=false;
if (!IsAuthorized(Expired, Contacted)) {
if(Expired)
return UnAuthorized(RESTAPI::Errors::ExpiredToken,EXPIRED_TOKEN);
return UnAuthorized(RESTAPI::Errors::MissingAuthenticationInformation, INVALID_TOKEN);