Deleted the jwt_token when the user logs out.

This commit is contained in:
lucic71 2020-05-06 22:56:33 +03:00
parent 2771ab1516
commit aa9e42933b
2 changed files with 5 additions and 16 deletions

View File

@ -145,9 +145,13 @@ int main() {
RESTORE_SOCKFD(logout_ret == OPERATION_CONNECTION_CLOSED,
sockfd, server_ip);
// delete the cookie if the operation was successful
/*
* Delete the cookie and the jwt_token if the operation was successful.
*
*/
if (logout_ret == OPERATION_SUCCESSFUL) {
FREE(cookie);
FREE(jwt_token);
}
} else if (strncmp(input_buffer, EXIT, sizeof(EXIT) - 1) == 0) {

View File

@ -661,18 +661,3 @@ logout_end:
return return_status;
}