diff --git a/includes/class-tulo-payway-sso2-api.php b/includes/class-tulo-payway-sso2-api.php index 5451fa4..11a459b 100644 --- a/includes/class-tulo-payway-sso2-api.php +++ b/includes/class-tulo-payway-sso2-api.php @@ -106,7 +106,7 @@ protected function identify_session() { "iss" => $organisation_id, "aud" => "pw-sso", "nbf" => $time, - "exp" => $time + 10, + "exp" => $time + 60, "iat" => $time ); @@ -296,7 +296,7 @@ protected function logout_user($locallyInitiated=true) { protected function decode_token($token, $client_secret) { try { - JWT::$leeway = 60; + JWT::$leeway = 120; $decoded = JWT::decode($token, $client_secret, array("HS256")); return $decoded; } catch(Firebase\JWT\BeforeValidException $e) { diff --git a/landing.php b/landing.php index 2435976..1367721 100644 --- a/landing.php +++ b/landing.php @@ -9,14 +9,16 @@ function write_log($log) { } } } + +$token = $_GET["t"]; +$redirect_url = $_GET["r"]; + $baseurl = explode( "wp-content" , __FILE__ ); $baseurl = $baseurl[0]; require_once( $baseurl . "wp-load.php" ); use \Firebase\JWT\JWT; -$token = $_GET["t"]; -$redirect_url = $_GET["r"]; $client_secret = get_option('tulo_server_secret'); $session = new Tulo_Payway_Session();