<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Juan Manuel Mauricio Zamarrón on Medium]]></title>
        <description><![CDATA[Stories by Juan Manuel Mauricio Zamarrón on Medium]]></description>
        <link>https://medium.com/@manuelmauriciozamarrn?source=rss-40f7788cefed------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4-V08u4eW_gvHErx.</url>
            <title>Stories by Juan Manuel Mauricio Zamarrón on Medium</title>
            <link>https://medium.com/@manuelmauriciozamarrn?source=rss-40f7788cefed------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 06:00:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manuelmauriciozamarrn/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Adding a Sound When Emptying the Trash in OpenSuse Leap 15.5 with XFCE4]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Hello friends, On my Mac Mini, I&#x2019;ve always enjoyed the satisfying sound that plays when I empty the trash. Recently, I rescued a Lenovo&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@manuelmauriciozamarrn/adding-a-sound-when-emptying-the-trash-in-opensuse-leap-15-5-with-xfce4-c238ffe06d13?source=rss-40f7788cefed------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@manuelmauriciozamarrn/adding-a-sound-when-emptying-the-trash-in-opensuse-leap-15-5-with-xfce4-c238ffe06d13?source=rss-40f7788cefed------2</link>
            <guid isPermaLink="false">https://medium.com/p/c238ffe06d13</guid>
            <category><![CDATA[script]]></category>
            <category><![CDATA[empty]]></category>
            <category><![CDATA[trash]]></category>
            <category><![CDATA[sound]]></category>
            <category><![CDATA[opensuse-leap]]></category>
            <dc:creator><![CDATA[Juan Manuel Mauricio Zamarrón]]></dc:creator>
            <pubDate>Tue, 13 Aug 2024 23:32:13 GMT</pubDate>
            <atom:updated>2024-08-14T00:59:31.117Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Tenda U12 Wireless USB and Kali Linux]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Hello, I was looking for a device for pentesting and I found a Tenda U12 device with 8812au chipset, one of many recommended by kali.org&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@manuelmauriciozamarrn/tenda-u12-wireless-usb-and-kali-linux-2a5796decb81?source=rss-40f7788cefed------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@manuelmauriciozamarrn/tenda-u12-wireless-usb-and-kali-linux-2a5796decb81?source=rss-40f7788cefed------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a5796decb81</guid>
            <category><![CDATA[tenda]]></category>
            <category><![CDATA[u12]]></category>
            <category><![CDATA[ac1300]]></category>
            <category><![CDATA[kali]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Juan Manuel Mauricio Zamarrón]]></dc:creator>
            <pubDate>Fri, 15 May 2020 03:55:24 GMT</pubDate>
            <atom:updated>2023-05-26T07:18:45.420Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Implementing JWT on Laravel 5.8]]></title>
            <link>https://medium.com/@manuelmauriciozamarrn/implementing-jwt-on-laravel-5-8-edc39f545886?source=rss-40f7788cefed------2</link>
            <guid isPermaLink="false">https://medium.com/p/edc39f545886</guid>
            <category><![CDATA[jwt-auth]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[laravel-framework]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Juan Manuel Mauricio Zamarrón]]></dc:creator>
            <pubDate>Fri, 24 May 2019 08:23:32 GMT</pubDate>
            <atom:updated>2019-05-24T08:47:26.196Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, I was trying to implement JWT and I followed some guides in this platform but I could not do it. For this reason, I tried to make my own implementation and here I’ll show you how I made it.</p><ol><li>The first step is add tymon/jwt-auth in our <strong><em>composer.json</em></strong> file:</li></ol><blockquote>$composer require tymon/jwt-auth:1.0.*</blockquote><p>2. Please update your third part libraries:</p><blockquote>$composer update</blockquote><p>3. After that we need add our secret string to facilitate the JWT generation to laravel, this string is saved at the bottom of <strong><em>.env</em></strong> file:</p><blockquote>$php artisan jwt:secret</blockquote><p>4. Now we need publish our JWTAuth provider using artisan:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9317ee451454085c4f8571a20600ba54/href">https://medium.com/media/9317ee451454085c4f8571a20600ba54/href</a></iframe><p>5. Please go to <strong><em>/app/Http/Kernel.php</em></strong> file and add this two lines at the end of <strong><em>$routeMiddleware</em></strong> array:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/686fe62f493620bdb6382110d8d7e964/href">https://medium.com/media/686fe62f493620bdb6382110d8d7e964/href</a></iframe><p>5. Please go to <strong><em>/app/User.php</em></strong> and add JWTSubject implementation following the next steps:</p><p>a. Import <strong>JWTSubject</strong> interface to this class with <strong><em>use</em></strong> keyword.<br>b. Implement <strong>JWTSubject </strong>after extends Authenticable.<br>c. Add <strong>getJWTIdentifier</strong> and get <strong>JWTCustomClaims</strong> methods.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3ee1eb5dfa445fa87078bba692f567ae/href">https://medium.com/media/3ee1eb5dfa445fa87078bba692f567ae/href</a></iframe><p>6. By default the api authentication is based on token, then we need change it by jwt driver:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f11b4071423e71a1e76e1e976814264/href">https://medium.com/media/9f11b4071423e71a1e76e1e976814264/href</a></iframe><p>7. Please create a new Controller to your API using php artisan:</p><blockquote>$php artisan make:controller APILoginController</blockquote><p>8. Go to <strong><em>/app/Http/Controllers/APILoginController.php</em></strong> and add login method.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa0da339f51f5b4a84d62ed89deaf4d4/href">https://medium.com/media/fa0da339f51f5b4a84d62ed89deaf4d4/href</a></iframe><p>9. Create a route to allow login you and get the JWT; to do this please go to <strong><em>/routes/api.php </em></strong>and add the login route like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/79b91b03249cfb7fd3cbf590998dd634/href">https://medium.com/media/79b91b03249cfb7fd3cbf590998dd634/href</a></iframe><p>10. At this point we can login in and get the JWT, but remember that we haven’t users. For this reason we need populate the users table and Laravel facilitate this process with seeders. You only need follow the next steps:</p><p>a. Please generate a seeder:</p><blockquote>$php artisan make:seeder UsersTableSeeder</blockquote><p>b. Go to /database/seeds/UsersTableSeeder.php and add the lines indicated on the comments of the next code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a33cc70a27c9e9bc3882b8c9965f741/href">https://medium.com/media/1a33cc70a27c9e9bc3882b8c9965f741/href</a></iframe><p>c. Go to /dabase/seeds/DatabaseSeeder.php and allow the call to UsersTableSeeder when database seeders run.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f801179d9b0b7880405d5e8b0854806/href">https://medium.com/media/1f801179d9b0b7880405d5e8b0854806/href</a></iframe><p>d. Please run the migration</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e27ed1997865bfc1b2bfffa427d13b1/href">https://medium.com/media/7e27ed1997865bfc1b2bfffa427d13b1/href</a></iframe><p>Note: You can go to mysql client and verify if your user written before exists in users table.</p><p>10. If your project is not running, please up the server to test all steps followed before.</p><blockquote>$php artisan serve</blockquote><p>11. Go to your favorite api client and send your login credentials (I’m using Postman):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*PGXMM4ZH9BbnX6OxYffc9g.png" /></figure><p>If you can see the JWT then you has gotten it successfully.</p><p>12. Now almost is ready, but we need add some exceptions when the token has been expired, be invalid or is blacklisted. For this we need go to <strong><em>/app/Exceptions/Handler.php</em></strong> and add some code like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3e156ac7e3ef3e97ceacf1a3ba6a2dfc/href">https://medium.com/media/3e156ac7e3ef3e97ceacf1a3ba6a2dfc/href</a></iframe><p>13. Protect your routes. First option is add the jwt.auth middleware directly on the route like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/34c7c7622601516eaea447d2641db056/href">https://medium.com/media/34c7c7622601516eaea447d2641db056/href</a></iframe><p>Please copy the token gotten in the step 11, go to your favorite API client and add the Authorization header like the next image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gi9mw31gNiLgSYFQyDtouA.png" /></figure><p>Note: There are a space between Bearer and the JWT</p><p>If you have some resource and you want to protect it fully, then in the controller of the resource you only need add the middleware on the constructor.</p><p>a. Go to the <strong><em>/routes/api.php</em></strong> and add your resource like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce84721defb5d76c413c1af8730c1a91/href">https://medium.com/media/ce84721defb5d76c413c1af8730c1a91/href</a></iframe><p>Note: I have created CategoryController previously.</p><p>b. Go to your controller and add the middleware on the constructor like the next code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/940a1d9f2f4215723b317b8fcbbc930f/href">https://medium.com/media/940a1d9f2f4215723b317b8fcbbc930f/href</a></iframe><p>Note: You can download complete project on github <a href="https://github.com/zamarronstein/jwt-laravel5.8/tree/development">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edc39f545886" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>