0
我正在創建移動應用程序和登錄我正在使用oauth。如何在laravel passport api中使用訪問令牌獲取user_id?
對於像http://localhost/darkhwast/public/oauth/token
網址它給了我如下輸出JSON:
{
"token_type": "Bearer",
"expires_in": 31536000,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjIyZWQ5YWFjY2U4MDVjYzc4NzUzMWM5NjVkMjdiZDZkNTIwOTQ5NGYxMTllN2Q3YWYyZDQyYWI5MjRjZjYyNTk0ZjhiNTBjNzMyNWMyYjlkIn0.eyJhdWQiOiIyIiwianRpIjoiMjJlZDlhYWNjZTgwNWNjNzg3NTMxYzk2NWQyN2JkNmQ1MjA5NDk0ZjExOWU3ZDdhZjJkNDJhYjkyNGNmNjI1OTRmOGI1MGM3MzI1YzJiOWQiLCJpYXQiOjE0OTgxMzQ1MjAsIm5iZiI6MTQ5ODEzNDUyMCwiZXhwIjoxNTI5NjcwNTIwLCJzdWIiOiIzIiwic2NvcGVzIjpbIioiXX0.CdhOhJ_6wb_KphCbnQEwI8iw94MmvlwCnG8PGPSEcm-YoXeaw2WoXiYRizbkhiXIP84BReRVIXxI-Rug6GUWwT1W8cjrvJinQT2UghCcUMqQ6nQlBingKUUlqyaww5rbcIj6RNDVuRtGnVhpSl6g1wsBz534GmNJyaY5F7t9ZJlf4Q80Cay9mV_YcLVnlOTZqTfGaujo6OM24pG6EoCiyOEF-4Vyd4Naov5O_AswuouCT7kuFdMbNYwNu6hB9_swf7yek_-shqgPk3AGJsnkavCI5Mgj3xQdhhtxoy6IxFcebBZ1iI6V_yd0-UDzHHsVZf2bVk4Hx0j84vA4ZkXXDkc85Lxqpafd31i51eXGPaW308VH2EPV9QwNOxNwNF9nl6uAlkcvfhfNBnNx_QGMALmyuNQf1CXY_rkA72pYkekTe4LQGX48dpIJUnFgnj8Jwsfjrda1D6_N5JvrnbvJkVZbCCgOD9vhJUGnVw6PyEcXldWHiW7EJZkAX9XYB571vzN__qkbM--UpU1fMY13HvWe6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