What data is encrypted when laravel uses jwt to generate token?

the following is an example of someone else I have seen. I think this example takes this line of data from the user and encrypts it. Is jwt encrypted like this? Can I encrypt only two fields?
the second question, can I write my own verification if I use jwt to generate token? Or is it verified by jwt? In what way do you usually use more? Thank you

$user = DB::table("users")->where("username", $request->input("username"))->first();
if(Hash::check($request->input("password"), $user->password)){ 
    $token = JWTAuth::fromUser($user);
}
May.25,2022

JWT is just a solution. The data implemented and transferred, as well as the use of the data have to be determined according to their own business. The important thing is the signature part.

Menu