Category : token

What I did: I added token expiration to application that has login system, by changed null to 1 minute expiration in sanctum.php file: /* |————————————————————————– | Expiration Minutes |————————————————————————– | | This value controls the number of minutes until an issued token will be | considered expired. If this value is null, personal access tokens ..

Read more

<?php $token = "eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MzAzMDM5NjUsInN1YiI6ImVLYXJ0IEF1dGhlbnRpY2F0aW9uIiwiaXNzIjoiZUthcnQifQ.oaXEVdEjkO6jCYXex_wuM57j9sNaQ-pAxZs0YkCd4PE"; // Get your token from a cookie or database $post = array(‘accesskey’ => ‘90336’); // Array of data with a trigger $request = jwt_request($token, $post); // Send or retrieve data function jwt_request($token, $post) { header(‘Content-Type: application/json’); // Specify the type of data $ch = curl_init(‘https://theroshanmart.com/admin/api-firebase/get-categories.php’); // Initialise cURL $post = json_encode($post); ..

Read more

I’m following the guide from Microsoft, on how to validate an identity token from Outlook : https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/validate-an-identity-token I have no problem to receive the public key, but then I’m stuck. I know I need to take the header and payload to match with the signature, from the public key. But how to do that in ..

Read more

Im building restful api and im using firebase/php-jwt for my authentication and currently what im doing for Receiving token from client like this : if(isset($_POST[‘token’])){ //do something } and sending it like this (so then client can access the token through the json response): echo json_encode([ ‘token’=>$token, ‘status’=>[ ‘error’=>false, ‘msg’=>’token created successfully’ ] ]); but ..

Read more