{"id":17,"date":"2022-05-03T13:55:52","date_gmt":"2022-05-03T13:55:52","guid":{"rendered":"https:\/\/perangkatlunakku.com\/?p=17"},"modified":"2022-12-21T07:22:56","modified_gmt":"2022-12-21T07:22:56","slug":"slim4-tutorial-api-3-jwt-access-token","status":"publish","type":"post","link":"https:\/\/perangkatlunakku.com\/en\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/","title":{"rendered":"Slim4  API Tutorial: 3 JWT access token"},"content":{"rendered":"<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png\" alt=\"Slim4 Login API and JWT access token\" class=\"wp-image-33\" srcset=\"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png 300w, https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token-150x150.png 150w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/figure>\n\n\n\n<p>In <strong>Slim4 API Tutorial 3 JWT access token<\/strong> , we will discuss how to use <strong>Slim4 JWT access token<\/strong> in <strong>login API<\/strong>. After user successfully <a href=\"https:\/\/perangkatlunakku.com\/en\/slim4-tutorial-api-2-validasi-request\/\" target=\"_blank\" rel=\"noreferrer noopener\">register<\/a>, application \/ systems need a method to secure the data from unauthorized access. <strong>Login<\/strong> is one of the authentication methods to secure the data that belongs to the user. Usually login requires <strong>username <\/strong>and <strong>password <\/strong>. On web\/frontend or mobile apps, user enter their username and password in a form view. At backend, username and password are sent by request. It can be formated in <strong>json<\/strong>. Furthermore, system will authenticate it, if username and password are correct then a response will be sent. One method that use to exchange the data between backend and frontend or mobile apps is <strong>JSON Web Token (JWT)<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-jwt-access-token-pada-php-slim4\">PHP Slim4 JWT Access Token<\/h2>\n\n\n\n<p>One of <em>JWT access token <\/em>packages can be used in Slim4 is <em>firebase\/php-jwt<\/em>. This package supports function to encode and decode access token. The access token itself can be containing data such as created time,  expired time, and user information. Install firebase\/php-jwt by using composer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">composer require firebase\/php-jwt<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-setting-jwt-key-dan-algoritma\">JWT key and algorithm settings<\/h2>\n\n\n\n<p>To make firebase\/php-jwt encode and decode function properly,  we need to set <strong>secret key <\/strong>and <strong>algorithm<\/strong>. This setting proposed to make encryption data same as decoded data (<em>plaintext<\/em>). Add secret key and algorithm in <em><strong>config\/settings.php<\/strong><\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">\/\/ other code\n'jwt' =&gt; [\n    'key' =&gt; 'secretkey',\n    'alg' =&gt; 'HS256',\n]\n\/\/ other code<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-php-autentikasi-login-menggunakan-jwt-access-token\">PHP login authentication using JWT access token<\/h2>\n\n\n\n<p>At the API login, before system responds using JWT access token, we need to validate the user's request and existance of the user. Validation process checks the email and password is valid or not. If the validation is valid, then system \/ application will check user's existance. It will check on user data in the database. If user exists on the database, system will generate JWT access token. Created time, expired time, user ID, user email will be stored in the JWT access token.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/\/ other code\nuse Firebase\\JWT\\JWT;\n\/\/ other code\n$app-&gt;post('\/login', function (Request $request, Response $response) use ($settings) {\n    $body = $request-&gt;getBody();\n    $json = json_decode($body, true);\n    $validator = new Validator;\n    $validator-&gt;requirePresence('email', true, 'Email field is required')\n        -&gt;notEmptyString('email', 'Email is required')\n        -&gt;email('email', false, 'Email must be valid')\n        -&gt;requirePresence('password', true, 'Password field is required')\n        -&gt;notEmptyString('password', 'Password is required');\n    $errors = $validator-&gt;validate($json);\n    if ($errors) {\n        $messages['message'] = 'Login failed';\n        foreach($errors as $error) {\n            $messages['error'][] = array_values($error);\n        }\n        $statusCode = 401;\n    } else {\n        $user = User::where('email', $json['email'])\n            -&gt;where('password', sha1($json['password']))\n            -&gt;where('status', 1)\n            -&gt;first();\n        if ($user) {\n            $iat = new DateTimeImmutable(); \/\/ issued at time\n            $exp = $iat-&gt;modify('+30 minutes')-&gt;getTimestamp(); \/\/ expired\n            $nbf = $iat-&gt;getTimestamp(); \/\/ not before\n            $payload = [\n                'iat' =&gt; $iat-&gt;getTimestamp(),\n                'exp' =&gt; $exp,\n                'nbf' =&gt; $nbf,\n                'user_id' =&gt; $user-&gt;id,\n                'email' =&gt; $user-&gt;email,\n            ];\n            $message['access_token'] = JWT::encode($payload, $settings['jwt']['key'], $settings['jwt']['alg']);\n            $statusCode = 200;\n        } else {\n            $message['message'] = 'Login failed';\n            $statusCode = 401;\n        }\n    }\n    $data = json_encode($message);\n    $response-&gt;getBody()-&gt;write($data);\n    return $response\n            -&gt;withHeader('Content-Type', 'application-json')\n            -&gt;withStatus($statusCode);\n});\n\/\/ other code<\/code><\/pre>\n\n\n\n<p>Login API using Postman:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"490\" src=\"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-postman-1024x490.png\" alt=\"Slim4 login JWT access token using Postman\" class=\"wp-image-30\" srcset=\"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-postman-1024x490.png 1024w, https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-postman-300x144.png 300w, https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-postman-768x368.png 768w, https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-postman.png 1124w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-decode-jwt-access-token\">Decode JWT Aaccess token<\/h2>\n\n\n\n<p>Sometimes the system requires additional data to be able to continue next process, for example <strong>user_id <\/strong>will use to find out user last update or maybe it will use as tag in shopping cart. One of effective way to get that data is decode function (<strong>decode<\/strong>). To be able to generate valid data, secret key and the algorithm for encryption must be same as decryption. Example code for decode function is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">use Firebase\\JWT\\Key;\n\n...\n$app-&gt;post('\/decode', function (Request $request, Response $response) use ($settings) {\n    $body = $request-&gt;getBody();\n    $json = json_decode($body, true);\n    $key = new Key($settings['jwt']['key'], $settings['jwt']['alg']);\n    $decode = JWT::decode($json['access_token'], $key);\n    $response-&gt;getBody()-&gt;write(json_encode($decode));\n    return $response-&gt;withHeader('Content-Type', 'application-json');\n});\n...<\/code><\/pre>\n\n\n\n<p>Decode JWT access token using Postman:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"529\" src=\"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-decode-postman-1024x529.png\" alt=\"Slim4 decode JWT access token\" class=\"wp-image-34\" srcset=\"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-decode-postman-1024x529.png 1024w, https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-decode-postman-300x155.png 300w, https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-decode-postman-768x397.png 768w, https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-decode-postman.png 1125w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Full code can be viewed at <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/pradesn\/fashion-store-slim4\/tree\/24c8d02500fcb9d1ad06d67b2831929571a77eff\" target=\"_blank\">Github<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>In this Slim4 API: 3 JWT Access Token tutorial, we will discuss how to use the Slim4 JWT access token for login API.<\/p>","protected":false},"author":1,"featured_media":33,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[9,7,4],"class_list":["post-17","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","tag-fashion-store-api","tag-php-backend","tag-slim4"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.5 (Yoast SEO v23.6) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Slim4 Tutorial API: 3 JWT access token - perangkatlunakku<\/title>\n<meta name=\"description\" content=\"Pada Slim4 tutorial API 3 JWT access token kali ini, akan dibahas bagaimana cara menggunakan Slim4 JWT access token pada login API.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/perangkatlunakku.com\/en\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Slim4 Tutorial API: 3 JWT access token\" \/>\n<meta property=\"og:description\" content=\"Pada Slim4 tutorial API 3 JWT access token kali ini, akan dibahas bagaimana cara menggunakan Slim4 JWT access token pada login API.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/perangkatlunakku.com\/en\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/\" \/>\n<meta property=\"og:site_name\" content=\"perangkatlunakku\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/groups\/perangkatlunakku\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-03T13:55:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-21T07:22:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Prade\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:description\" content=\"Pada Slim4 tutorial API 3 JWT access token kali ini, akan dibahas bagaimana cara menggunakan Slim4 JWT access token pada login API.\" \/>\n<meta name=\"twitter:creator\" content=\"@prangkatlunakku\" \/>\n<meta name=\"twitter:site\" content=\"@prangkatlunakku\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prade\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/\"},\"author\":{\"name\":\"Prade\",\"@id\":\"https:\/\/perangkatlunakku.com\/#\/schema\/person\/b2ab89d36e0aad24731c098cdff81662\"},\"headline\":\"Slim4 Tutorial API: 3 JWT access token\",\"datePublished\":\"2022-05-03T13:55:52+00:00\",\"dateModified\":\"2022-12-21T07:22:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/\"},\"wordCount\":444,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/perangkatlunakku.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png\",\"keywords\":[\"fashion-store-api\",\"php-backend\",\"slim4\"],\"articleSection\":[\"Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/\",\"url\":\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/\",\"name\":\"Slim4 Tutorial API: 3 JWT access token - perangkatlunakku\",\"isPartOf\":{\"@id\":\"https:\/\/perangkatlunakku.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png\",\"datePublished\":\"2022-05-03T13:55:52+00:00\",\"dateModified\":\"2022-12-21T07:22:56+00:00\",\"description\":\"Pada Slim4 tutorial API 3 JWT access token kali ini, akan dibahas bagaimana cara menggunakan Slim4 JWT access token pada login API.\",\"breadcrumb\":{\"@id\":\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#primaryimage\",\"url\":\"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png\",\"contentUrl\":\"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png\",\"width\":300,\"height\":300,\"caption\":\"Slim4 Login API JWT Access Token\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/perangkatlunakku.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Slim4 Tutorial API: 3 JWT access token\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/perangkatlunakku.com\/#website\",\"url\":\"https:\/\/perangkatlunakku.com\/\",\"name\":\"perangkatlunakku\",\"description\":\"perangkatlunakku permudah kehidupan\",\"publisher\":{\"@id\":\"https:\/\/perangkatlunakku.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/perangkatlunakku.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/perangkatlunakku.com\/#organization\",\"name\":\"perangkatlunakku\",\"url\":\"https:\/\/perangkatlunakku.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/perangkatlunakku.com\/#\/schema\/logo\/image\/\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"perangkatlunakku\"},\"image\":{\"@id\":\"https:\/\/perangkatlunakku.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/groups\/perangkatlunakku\",\"https:\/\/x.com\/prangkatlunakku\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/perangkatlunakku.com\/#\/schema\/person\/b2ab89d36e0aad24731c098cdff81662\",\"name\":\"Prade\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/perangkatlunakku.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0ee64dbab8883b02f7f89ed14f84c1757d30944d9f72e901d2664375df425a77?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0ee64dbab8883b02f7f89ed14f84c1757d30944d9f72e901d2664375df425a77?s=96&d=mm&r=g\",\"caption\":\"Prade\"},\"sameAs\":[\"http:\/\/perangkatlunakku.com\"],\"url\":\"https:\/\/perangkatlunakku.com\/en\/author\/pradesn\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Slim4 Tutorial API: 3 JWT access token - perangkatlunakku","description":"Pada Slim4 tutorial API 3 JWT access token kali ini, akan dibahas bagaimana cara menggunakan Slim4 JWT access token pada login API.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/perangkatlunakku.com\/en\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/","og_locale":"en_US","og_type":"article","og_title":"Slim4 Tutorial API: 3 JWT access token","og_description":"Pada Slim4 tutorial API 3 JWT access token kali ini, akan dibahas bagaimana cara menggunakan Slim4 JWT access token pada login API.","og_url":"https:\/\/perangkatlunakku.com\/en\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/","og_site_name":"perangkatlunakku","article_publisher":"https:\/\/www.facebook.com\/groups\/perangkatlunakku","article_published_time":"2022-05-03T13:55:52+00:00","article_modified_time":"2022-12-21T07:22:56+00:00","og_image":[{"width":300,"height":300,"url":"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png","type":"image\/png"}],"author":"Prade","twitter_card":"summary_large_image","twitter_description":"Pada Slim4 tutorial API 3 JWT access token kali ini, akan dibahas bagaimana cara menggunakan Slim4 JWT access token pada login API.","twitter_creator":"@prangkatlunakku","twitter_site":"@prangkatlunakku","twitter_misc":{"Written by":"Prade","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#article","isPartOf":{"@id":"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/"},"author":{"name":"Prade","@id":"https:\/\/perangkatlunakku.com\/#\/schema\/person\/b2ab89d36e0aad24731c098cdff81662"},"headline":"Slim4 Tutorial API: 3 JWT access token","datePublished":"2022-05-03T13:55:52+00:00","dateModified":"2022-12-21T07:22:56+00:00","mainEntityOfPage":{"@id":"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/"},"wordCount":444,"commentCount":3,"publisher":{"@id":"https:\/\/perangkatlunakku.com\/#organization"},"image":{"@id":"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#primaryimage"},"thumbnailUrl":"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png","keywords":["fashion-store-api","php-backend","slim4"],"articleSection":["Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/","url":"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/","name":"Slim4 Tutorial API: 3 JWT access token - perangkatlunakku","isPartOf":{"@id":"https:\/\/perangkatlunakku.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#primaryimage"},"image":{"@id":"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#primaryimage"},"thumbnailUrl":"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png","datePublished":"2022-05-03T13:55:52+00:00","dateModified":"2022-12-21T07:22:56+00:00","description":"Pada Slim4 tutorial API 3 JWT access token kali ini, akan dibahas bagaimana cara menggunakan Slim4 JWT access token pada login API.","breadcrumb":{"@id":"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#primaryimage","url":"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png","contentUrl":"https:\/\/perangkatlunakku.com\/wp-content\/uploads\/2022\/05\/slim4-login-and-access-token.png","width":300,"height":300,"caption":"Slim4 Login API JWT Access Token"},{"@type":"BreadcrumbList","@id":"https:\/\/perangkatlunakku.com\/2022\/05\/03\/slim4-tutorial-api-3-jwt-access-token\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/perangkatlunakku.com\/"},{"@type":"ListItem","position":2,"name":"Slim4 Tutorial API: 3 JWT access token"}]},{"@type":"WebSite","@id":"https:\/\/perangkatlunakku.com\/#website","url":"https:\/\/perangkatlunakku.com\/","name":"perangkatlunakku","description":"perangkatlunakku permudah kehidupan","publisher":{"@id":"https:\/\/perangkatlunakku.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/perangkatlunakku.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/perangkatlunakku.com\/#organization","name":"perangkatlunakku","url":"https:\/\/perangkatlunakku.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/perangkatlunakku.com\/#\/schema\/logo\/image\/","url":"","contentUrl":"","caption":"perangkatlunakku"},"image":{"@id":"https:\/\/perangkatlunakku.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/groups\/perangkatlunakku","https:\/\/x.com\/prangkatlunakku"]},{"@type":"Person","@id":"https:\/\/perangkatlunakku.com\/#\/schema\/person\/b2ab89d36e0aad24731c098cdff81662","name":"Prade","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/perangkatlunakku.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0ee64dbab8883b02f7f89ed14f84c1757d30944d9f72e901d2664375df425a77?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0ee64dbab8883b02f7f89ed14f84c1757d30944d9f72e901d2664375df425a77?s=96&d=mm&r=g","caption":"Prade"},"sameAs":["http:\/\/perangkatlunakku.com"],"url":"https:\/\/perangkatlunakku.com\/en\/author\/pradesn\/"}]}},"_links":{"self":[{"href":"https:\/\/perangkatlunakku.com\/en\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/perangkatlunakku.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/perangkatlunakku.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/perangkatlunakku.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/perangkatlunakku.com\/en\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":0,"href":"https:\/\/perangkatlunakku.com\/en\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/perangkatlunakku.com\/en\/wp-json\/wp\/v2\/media\/33"}],"wp:attachment":[{"href":"https:\/\/perangkatlunakku.com\/en\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/perangkatlunakku.com\/en\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/perangkatlunakku.com\/en\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}