diff --git a/kernel/modules/secure/controllers/SecureRestController.php b/kernel/modules/secure/controllers/SecureRestController.php index d9c6d60..0eec824 100644 --- a/kernel/modules/secure/controllers/SecureRestController.php +++ b/kernel/modules/secure/controllers/SecureRestController.php @@ -35,17 +35,17 @@ class SecureRestController extends RestController "iat" => time(), "exp" => date("Y-m-d H:i:s", strtotime("+30 days")) ], - key: $model->{'password_hash'}, + key: $model->password_hash, alg: 'HS256' ); - $model->{'access_token'} = $jwt; - $model->{'access_token_expires_at'} = - JWT::decode($jwt, new Key($model->{'password_hash'}, 'HS256'))->exp; + $model->access_token = $jwt; + $model->access_token_expires_at = + JWT::decode($jwt, new Key($model->password_hash, 'HS256'))->exp; $res = [ - "access_token" => $model->{'access_token'}, - "access_token_expires_at" => $model->{'access_token_expires_at'}, + "access_token" => $model->access_token, + "access_token_expires_at" => $model->access_token_expires_at, ]; } $model->save();