BuLi-Tipp Login hinzugefügt und Rangliste angefangen
This commit is contained in:
18
bulitipp/tippeintragen.php
Executable file
18
bulitipp/tippeintragen.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
require '../vendor/autoload.php';
|
||||
use Firebase\JWT\JWT;
|
||||
use Firebase\JWT\Key;
|
||||
|
||||
include("jwtsecret.php");
|
||||
|
||||
if(!isset($_GET["token"])) die("GET token fehlt");
|
||||
$token=$_GET["token"];
|
||||
|
||||
$payload = JWT::decode($token, new Key($secret, 'HS256'));
|
||||
|
||||
if($payload->exp < time()){
|
||||
die("Token abgelaufen");
|
||||
}
|
||||
|
||||
print_r($payload);
|
||||
|
||||
Reference in New Issue
Block a user