Answers for "decode jwt token laravel"

PHP
1

decode jwt token laravel

$token = "eyJhbGciOiJSUzI1NiJ9.eyJyb2xlcyI6WyJST0xFX1VTRVIiXSwidXNlcm5hbWUiOiJqYWdhZHVAaHViaWktbmV0d29yay5jb20iLCJleHAiOjE1MzYxNTI0MDAsImlhdCI6MTUzNTU0NzYwMH0.B7gnfGdW1ijAIlo9xUI0DwkGaajQAQPBkRx4ChILXRNtpLdwgEl_9gvWdiidFbSXJseS8jslOfuAFUIWATmbNBoWVa3nc8SxkIrKI29xZuN6hB7R-63RH2BKsAVPsEjgTIJoqkkCrfrSum-_d3LEf36jcXqZb8M-GRKI477IwSDDwG_7YK5v0mu8N4TATXhN0tZGNYxp8Y27EI-g0Gmj9BIiobxnqVVoBWHN5J8d-UCrXRq94ifhEiQBxkG9r_eacMscB80n1VsiN2ouKH2kX-HRxRJmcgmydxvR7RcEW-P6koTxkaZJGO6mv7auSudTFlDENpwD4OD7gtn_wMUDS_OuN8WT7rZp8lwKY9f8J9fiGyq5J-8C_HmyjW-h8WhuJmTUaKhCZ-eLgDm4Vs2IQGYkHJEDFumnIZ607MAa1CW1ChAvurqvUqJ3G4TTN4wYqAHpSKz4y8SAMLjO91cedBPH6K5i9lh5htF-mW_htem7e5ornicU_djSccgHbxfXHQYTHCnqLp7-ONfl_p4nmhIEK0wcF0gkBXbIitzeTjy7C_uf_FV1sLPE5cY3PUP42DmHrG4PuXHLv_L1EjErkrpna7pChKA_TPeiZjqMcQoE70sZw8rr8KnRF2hpABdU_M2ZXOt_vF5-T8mLmKqs0LHxE089vVC3xsAh0mUr4FE";

$tokenParts = explode(".", $token);  
$tokenHeader = base64_decode($tokenParts[0]);
$tokenPayload = base64_decode($tokenParts[1]);
$jwtHeader = json_decode($tokenHeader);
$jwtPayload = json_decode($tokenPayload);
print $jwtPayload->username;
Posted by: Guest on November-10-2020
0

decode jwt token laravel

eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiZmVjYzEzMzVkMGYyMzMyMTI4MmEyNTE3OTQ4MWQ3YjE0ODRmN2FmZjA0OGQyYjAyNjc2NmNjNjVjMGYxNWQ4NmViNTcwMjAxYzcwMWM3MGEiLCJpYXQiOjE2Mjg3MTcyNDMuODM4MTgyLCJuYmYiOjE2Mjg3MTcyNDMuODM4MTg1LCJleHAiOjE2NjAyNTMyNDMuNjc3NDUzLCJzdWIiOiIyIiwic2NvcGVzIjpbXX0.DzLK2J1VVDRXEwtu64Z3eLYPGDdtAzX45iMQhCF5AbCkmvIrrlNmPBbuun_lrdREeMsm13oJtCl3VSeQQta3eXp4mWoKfSGCaGmLU5GU087O-a8M0hkMQeASneviBaMwtNsG1TKTe7OkCuykFnrA4VpqAIOaWwtvj3yxcg03RZ0kGs4rmvnnAT4mjl3iMVfl7HFLvOJmALh8oAVKYfBQuE7dUPgVdqPF5H0apgYkWDXJYT9s2s3PoMKB8I3poW8Duj6yTwe2KHIJy5Nc5BPqmJiznYMMSjEfv4FNGymUx2GEXDF_OarUjICW5wsMti5XyBZ3uM8D2NUrlv_0Q45RGbcvTBEP4JiJSIAp_c1ia2UTDCAGoC32zTqgaoFkbkIRIZEL42iPMOcAPX3jBlsqZzjYQaY2ExouGZaIcAZLOJYnX_DjBUnnMZ1ZfH8XYdGHRvlQTTzibn49xNPsSYE8y7DF_f-ceHW82ZgA3lxO4mJN4719X_2ejgbMMOBv0-nWjcc27XhkdMw0T45OXspdE54n878jK-x3AFBhogoQj3C1rqxg-FUjGGbdn94s3zDSJzD55JJWrsOOiFcUAA2qftr5uRtYcJNSdm1jo_KYhMeDTjOimaBYMIN3j1RAR10Kn_WUx1jfJ3pag--BpxkUmMmvWoJVUcmb4TQH0QX1ORE
Posted by: Guest on August-12-2021

Browse Popular Code Answers by Language