PHP + Json Web Token (JWT) Tutorial

  Рет қаралды 9,605

Gary Clarke

Gary Clarke

Күн бұрын

Пікірлер: 14
@themonster4759
@themonster4759 Жыл бұрын
you are The King Of PHP
@unknownunknown8573
@unknownunknown8573 Жыл бұрын
As always, great content! Thanks Gary!
@niknt
@niknt Жыл бұрын
Thank you for this useful video. We can use JWT token to get an access to the API endpoint. Adding HTTP Header: "Authorization: Bearer " will help us. But what is a correct way of storing this access token in the application? Should we store it in the Database? Or maybe we should store this token in the cache (Redis, Memached)?
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
It's a long answer which really depends on your application but memory or DB would be ok for server-side applications. For mobile or desktop, you'll more likely need to rely on something else...Keychain / Keystore / CredsLocker
@truthteachers
@truthteachers Жыл бұрын
Hi Gary, I was excited about the topic and then got disappointed when i realized too soon that it was linked into TDD and Pest. I was expecting a course JWT on its own with the test dependency. 😢
@jmmmmmmmmmk
@jmmmmmmmmmk 9 ай бұрын
Hello Does not https transfer data in encrypted form between client and sever Do we still need JWT? Can you elaborate on this please?
@GaryClarkeTech
@GaryClarkeTech 9 ай бұрын
JWT is used for authentication, not encryption.
@jmmmmmmmmmk
@jmmmmmmmmmk 9 ай бұрын
@@GaryClarkeTech thank you nice video
@devfahim5933
@devfahim5933 Жыл бұрын
Hey Gary great content. I was trying to generate a secret base64 encoding (verify signature ). Can shortly give me an idea about that . How can i generate that.
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
In php you can do something like this...this is a little simplified but you should get the idea // Your data and secret key $data = "Your data here"; $secret_key = "your_secret_key"; // Create a signature using a cryptographic hash function, e.g., SHA-256 $signature = hash_hmac('sha256', $data, $secret_key, true); // Encode the signature in Base64 $encoded_signature = base64_encode($signature); echo $encoded_signature;
@Anthony99
@Anthony99 8 ай бұрын
Great video, thank you!! :-) Exceptional work... I gave a like & subscribed.
@GaryClarkeTech
@GaryClarkeTech 8 ай бұрын
Awesome, thank you!
@Anthony99
@Anthony99 8 ай бұрын
No problems at all... hopefully it helps! 🙂 I was about to get to work writing JWT's into one of my web apps, although now I'm not sure what the advantage of using JWT is over sessions in PHP? I was originally going to do it because I'm having trouble with cookies expiring after 15 mins unattended (think its the web server)... then I read people say don't store JWT in local storage, only in cookies... but my cookies are expiring anyway, so JWT would die with the expired cookie. What do you think the key advantage to using a JWT is? Thanks for your time... :-)
@sliceem88
@sliceem88 Жыл бұрын
Tnx ! Perfect content !
PHPStan static analysis in PHP
46:56
Gary Clarke
Рет қаралды 6 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Use PHP to Create an MVC Framework - Full Course
6:03:47
freeCodeCamp.org
Рет қаралды 261 М.
What Is JWT and Why Should You Use JWT
14:53
Web Dev Simplified
Рет қаралды 1,2 МЛН
Test Driven Development with Pest PHP
1:16:30
Gary Clarke
Рет қаралды 8 М.
Что такое JWT и как его создать
14:32
Listen IT
Рет қаралды 54 М.
NgRx for Angular 19 State Management: The Ultimate Guide
20:07
Tech Design Pilot
Рет қаралды 150
PHP doesn't suck (anymore)
10:48
Aaron Francis
Рет қаралды 212 М.
Using Generics with PHP
25:55
Laracasts
Рет қаралды 15 М.
Аутентификация. Сессии и JWT
23:37
senior_zone
Рет қаралды 16 М.
JWT Authentication Tutorial - Node.js
27:36
Web Dev Simplified
Рет қаралды 1 МЛН
Session Vs JWT: The Differences You May Not Know!
7:00
ByteByteGo
Рет қаралды 292 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН