<?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 Andino Inyang on Medium]]></title>
        <description><![CDATA[Stories by Andino Inyang on Medium]]></description>
        <link>https://medium.com/@doninyangm?source=rss-4cf447b726cd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eywI9FbdiVdjKSuTx0MSUQ.jpeg</url>
            <title>Stories by Andino Inyang on Medium</title>
            <link>https://medium.com/@doninyangm?source=rss-4cf447b726cd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:53:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@doninyangm/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[Laravel JWT-Auth: Refresh token on Auto-Pilot (series 2)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@doninyangm/laravel-jwt-auth-refresh-token-on-auto-pilot-series-2-206ef135a103?source=rss-4cf447b726cd------2"><img src="https://cdn-images-1.medium.com/max/750/1*B6-nPjczEquMdWacpVDN0A.png" width="750"></a></p><p class="medium-feed-snippet">In a previous article, we covered the basics of authenticating users with JSON Web Tokens (JWT) in Laravel using the tymondesigns/jwt-auth&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@doninyangm/laravel-jwt-auth-refresh-token-on-auto-pilot-series-2-206ef135a103?source=rss-4cf447b726cd------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@doninyangm/laravel-jwt-auth-refresh-token-on-auto-pilot-series-2-206ef135a103?source=rss-4cf447b726cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/206ef135a103</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[lumen]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Andino Inyang]]></dc:creator>
            <pubDate>Tue, 07 Mar 2023 19:07:57 GMT</pubDate>
            <atom:updated>2023-03-07T19:18:24.034Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Credit Bureaus and the Adoption of Credit in West Africa]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@doninyangm/credit-bureaus-and-the-adoption-of-credit-in-west-africa-fb0fb9b3f43?source=rss-4cf447b726cd------2"><img src="https://cdn-images-1.medium.com/max/752/1*D-4FUhvIFvdGLpbcXYyY-g.jpeg" width="752"></a></p><p class="medium-feed-snippet">Credit availability is vital to economic growth, particularly in developing regions like West Africa. However, several problems, such as a&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@doninyangm/credit-bureaus-and-the-adoption-of-credit-in-west-africa-fb0fb9b3f43?source=rss-4cf447b726cd------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@doninyangm/credit-bureaus-and-the-adoption-of-credit-in-west-africa-fb0fb9b3f43?source=rss-4cf447b726cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb0fb9b3f43</guid>
            <category><![CDATA[west-africa]]></category>
            <category><![CDATA[credit-score]]></category>
            <category><![CDATA[credit-bureau]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[loans]]></category>
            <dc:creator><![CDATA[Andino Inyang]]></dc:creator>
            <pubDate>Fri, 24 Feb 2023 10:21:56 GMT</pubDate>
            <atom:updated>2023-02-24T10:21:56.336Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Laravel  JWT-Auth: Refresh token on Auto-Pilot]]></title>
            <link>https://medium.com/@doninyangm/laravel-jwt-auth-refresh-token-on-auto-pilot-eb114a46283b?source=rss-4cf447b726cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb114a46283b</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[lumen]]></category>
            <category><![CDATA[token]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[jwt]]></category>
            <dc:creator><![CDATA[Andino Inyang]]></dc:creator>
            <pubDate>Mon, 08 Jun 2020 07:22:46 GMT</pubDate>
            <atom:updated>2023-03-07T19:19:32.660Z</atom:updated>
            <content:encoded><![CDATA[<h3>Laravel JWT-Auth: Refresh token on Auto-Pilot</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6nbfWdFhmIdKlK8Mu1J5QQ.jpeg" /></figure><p>So let’s assume you’ve built an API, and you need to automate refreshing of tokens. Well Laravel makes this easy without manually keeping track of <strong>access_token, refresh_token, expired_in.</strong></p><blockquote>Disclaimer: This tutorial assumes you know how to set up <a href="https://github.com/tymondesigns/jwt-auth">tymondesigns\Jwt-Auth </a>with Laravel, if not please refer to <a href="https://blog.pusher.com/laravel-jwt/"><strong>this article</strong></a> before you continue.</blockquote><p>There are different implementations used in refreshing tokens in Laravel micro-service-based systems, here are some of the commonly used:</p><ol><li>Extend Tymon BaseMiddleware.</li><li>Create a refresh route; front-end apps decipher token expiring time and calls the refresh route to update.</li></ol><p><strong>Extend Tymon BaseMiddleware</strong><br>Open terminal in your project root, and run the command below to create a new custom middleware.</p><pre>$ php artisan make:middleware JwtMiddleware</pre><p>This file can be located here <em>app/Http/Middleware/JwtMiddleware</em>. Open up the file and replace the content with the following:</p><pre>$&lt;?php</pre><pre>namespace App\Http\Middleware;</pre><pre>use Closure;<br>use JWTAuth;<br>use Exception;<br>use Tymon\JWTAuth\Http\Middleware\BaseMiddleware;</pre><pre>class JwtMiddleware extends BaseMiddleware<br>{<br>    /**<br>     * Handle an incoming request.<br>     *<br>     * <a href="http://twitter.com/param">@param</a>  \Illuminate\Http\Request  $request<br>     * <a href="http://twitter.com/param">@param</a>  \Closure  $next<br>     * <a href="http://twitter.com/return">@return</a> mixed<br>     */<br>    public function handle($request, Closure $next){<br>        try {<br>            $user = JWTAuth::parseToken()-&gt;authenticate();<br>        } catch (Exception $e) {<br>            if ($e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException){<br>                $status     = 401;<br>                $message    = &#39;This token is invalid. Please Login&#39;;<br>                return response()-&gt;json(compact(&#39;status&#39;,&#39;message&#39;),401);<br>            }else if ($e instanceof \Tymon\JWTAuth\Exceptions\TokenExpiredException){<br>                // If the token is expired, then it will be refreshed and added to the headers<br>                try<br>                {<br>                  $refreshed = JWTAuth::refresh(JWTAuth::getToken());<br>                  $user = JWTAuth::setToken($refreshed)-&gt;toUser();<br>                  $request-&gt;headers-&gt;set(&#39;Authorization&#39;,&#39;Bearer &#39;.$refreshed);<br>                }catch (JWTException $e){<br>                    return response()-&gt;json([<br>                        &#39;code&#39;   =&gt; 103,<br>                        &#39;message&#39; =&gt; &#39;Token cannot be refreshed, please Login again&#39;<br>                    ]);<br>                }<br>            }else{<br>                $message = &#39;Authorization Token not found&#39;;<br>                return response()-&gt;json(compact(&#39;message&#39;), 404);<br>            }<br>        }<br>        return $next($request);<br>    }<br>}</pre><p>In the snippet above, when the token is expired, a new token is generated from the expired token and is added to the response headers. The calling app needs to check if the response has been updated and save the updated token against the next request.</p><p><strong>CONCLUSION</strong></p><p>Continue learning in <a href="https://medium.com/@doninyangm/laravel-jwt-auth-refresh-token-on-auto-pilot-series-2-206ef135a103">part 2 of this series</a>. Till we meet again Happy coding!</p><p><strong>Hire me:</strong></p><p>Email: inyangandino@gmail.com</p><p>LinkedIn: <a href="https://www.linkedin.com/in/andinoinyang/">Andino Inyang</a></p><p>Thank you for reading my article. Here at my <a href="https://masteringbackend.com/">blog</a> or <a href="https://bit.ly/mymediumprofile">medium</a> I regularly write about backend development, digital marketing and content management system. To read my future posts simply <a href="https://bit.ly/mymediumpublication">join my publication</a> or click ‘Follow’ Also feel free to connect with me via <a href="http://twitter.com/kaperskyguru">Twitter</a>, <a href="https://facebook.com/multimegaitschool">Facebook</a>, <a href="https://instagram.com/kaperskyguru">Instagram</a>.</p><p><em>If you are interested in backend development (or you’re internet enthusiast) both (Mobile | Web | Desktop) videos subscribe to my </em><a href="https://bit.ly/solomoneseme"><em>Youtube channel</em></a><em>, we will be posting a collection of help full tutorials and guides like this one for artisans</em>.</p><p>If you enjoy this post, make sure to let us know and share it with your friends and subscribe to my growing <a href="https://bit.ly/solomoneseme">channel</a>.</p><p>Sharing is caring.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb114a46283b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create your first ever PHP Pakagist for Composer v.2]]></title>
            <link>https://publication.masteringbackend.com/create-your-first-ever-php-pakagist-for-composer-v-2-5118c7dd07aa?source=rss-4cf447b726cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/5118c7dd07aa</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[laravel-framework]]></category>
            <category><![CDATA[composer]]></category>
            <category><![CDATA[packagist]]></category>
            <dc:creator><![CDATA[Andino Inyang]]></dc:creator>
            <pubDate>Mon, 30 Sep 2019 16:18:27 GMT</pubDate>
            <atom:updated>2020-07-30T10:39:46.216Z</atom:updated>
            <content:encoded><![CDATA[<h3>Create your first ever PHP Packagist for Composer part 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B2Fe8Q1ThyLhbHhPxP6y3w.png" /><figcaption>picture credit: <a href="https://whoisryosuke.com/">https://whoisryosuke.com</a></figcaption></figure><p>Composer is a powerful tool used by PHP to manage dependencies, while Packagist allows the composer to find codes where they are located.</p><p>This is the second guide in our PHP packages series. You can find the previous parts here:</p><p><a href="https://medium.com/@doninyangm/create-your-first-ever-php-pakagist-for-composer-v-1-b10e4722cb01">Series 1.</a></p><p>In the previous guide, we looked at how to create a composer using the file system. In this guide, we will be creating a composer via the terminal.</p><h3>Structure your project</h3><p>For the sake of this tutorial, we will be creating a composer package from scratch. Nevertheless, the composer can be added to an existing project. Let us take our example project name to be “hello-composer”. We will also take to note that the composer uses the “<strong><em>vendor/package</em></strong>” format internally. I would set vendor to <em>inyang</em> and package to <em>hello-composer</em>.</p><p>It’s best practice to store your files in “src” folder. The project structure should start like this: “<em>hello-composer/src/HelloComposer/ComposerHello.php</em>”.</p><pre>&lt;?php namespace HelloComposer;</pre><pre>class ComposerHello{</pre><pre>  public static function hello(){</pre><pre>     return “Hello! Hope you are enjoying learning Composer and     packagist”;</pre><pre>  }</pre><pre>}</pre><h3>Initialize composer</h3><p>Open your project root in terminal window and run the <em>composer init </em>command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*u9yMh3M-261zecmdQdhynA.png" /><figcaption>running composer init on terminal window</figcaption></figure><p>Now a composer.json file would be created in project root with the following contents:</p><pre>{<br>    &quot;name&quot;: &quot;inyang/hello-october&quot;,<br>    &quot;description&quot;: &quot;PHP Packagist for composer example&quot;,<br>    &quot;authors&quot;: [<br>        {<br>            &quot;name&quot;: &quot;Andino Inyang&quot;,<br>            &quot;email&quot;: &quot;doninyangm@gmail.com&quot;<br>        }<br>    ],<br>    &quot;minimum-stability&quot;: &quot;dev&quot;,                                      &quot;prefer-stable&quot; : true,<br>    &quot;require&quot;: {<br>        &quot;php&quot;: &quot;&gt;=5.3.0&quot;<br>    },<br>    &quot;autoload&quot;: {<br>        &quot;psr-0&quot;: {<br>            &quot;HelloComposer&quot;: &quot;src/&quot;<br>        }<br>    }<br>}</pre><p>Update if otherwise. <strong>“composer install”</strong> inside your root dir:</p><pre>composer install</pre><h3>Packing your Packagist</h3><p>Go to Github and create a new public repo called <strong>“hellocomposer”</strong>, start the Git project inside your root dir and push it. Copy your git location you would need it, it would look like this:</p><pre>git@github.com:username/hello-composer.git</pre><p><strong>Submit your packagist</strong></p><p>Go to <a href="http://packagist.org/">packagist.org</a> and create a new package. Packagist requires a github source, you can use the force update features, but I advice you setup a hook so packages automatic syncs with your github repo. This can be done navigating the <em>Settings&gt;Service Hooks&gt;Packagist</em> service</p><p>Hurray you have just created your first packagist.</p><h3>Conclusion</h3><p>This the end of this series, but follow to get more interesting updates.</p><p>Happy coding! May the code always be in your favour as you leave your foot print in the Eco-system.</p><p>Thank you for reading my article and my editor <a href="https://medium.com/u/8b0955f01559">Solomon Eseme</a>. Here at my <a href="https://masteringbackend.com/">blog</a> or <a href="https://bit.ly/mymediumprofile">medium</a> I regularly write about backend development, digital marketing and content management system. To read my future posts simply <a href="https://bit.ly/mymediumpublication">join my publication</a> or click ‘Follow’ Also feel free to connect with me via <a href="http://twitter.com/kaperskyguru">Twitter</a>, <a href="https://facebook.com/multimegaitschool">Facebook</a>, <a href="https://instagram.com/kaperskyguru">Instagram</a>.</p><p><em>If you are interested in backend development (or you’re internet enthusiast) both (Mobile | Web | Desktop) videos subscribe to my </em><a href="https://bit.ly/solomoneseme"><em>Youtube channel</em></a><em>, we will be posting a collection of help full tutorials and guides like this one for artisans</em>.</p><p>If you enjoy this post, make sure to let us know and share it with your friends and subscribe to my growing <a href="https://bit.ly/solomoneseme">channel</a>.</p><p>Sharing is caring.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5118c7dd07aa" width="1" height="1" alt=""><hr><p><a href="https://publication.masteringbackend.com/create-your-first-ever-php-pakagist-for-composer-v-2-5118c7dd07aa">Create your first ever PHP Pakagist for Composer v.2</a> was originally published in <a href="https://publication.masteringbackend.com/">MasteringBackend</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create your first ever PHP Pakagist for Composer v.1]]></title>
            <link>https://publication.masteringbackend.com/create-your-first-ever-php-pakagist-for-composer-v-1-b10e4722cb01?source=rss-4cf447b726cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/b10e4722cb01</guid>
            <category><![CDATA[packagist]]></category>
            <category><![CDATA[composer]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Andino Inyang]]></dc:creator>
            <pubDate>Fri, 27 Sep 2019 17:11:32 GMT</pubDate>
            <atom:updated>2020-07-30T10:40:41.210Z</atom:updated>
            <content:encoded><![CDATA[<h3>Create your first ever PHP Packagist for Composer Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*4ijIE7ogCpQN_sPjB6II-Q.jpeg" /><figcaption>Packagist is a default composer repository</figcaption></figure><p>I recently started my journey of contributing to open source. Contributing to the open-source community is now a big deal in the tech industry, every junior developer, and an intermediate like myself is expected to venture in. Employers now demand my Github repo shared with them, more than ever. Building libraries that can be used by others is a cool way to start I thought to myself. However, I have been questioning myself about building libraries for other PHP developers (especially with multiple frameworks in consideration). Questions like What happens when every library I build needs to be bootstrapped? Would ```git clone``` do the trick? What happens when people need the library in different projects? Packagist solves all these. We are going to look closely to the key terms before shortly before I dive into the deal of the day.</p><p><strong>So What’s a Composer??</strong></p><p>According to the Official Composer website, Composer is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. In simple English Composer is a dependency management tool for PHP, composer replaces the old use of PEAR (PHP Extension Application Repository).</p><p><strong>What’s Packagist??</strong></p><p>Packagist is the default Composer package repository. It lets you find packages and lets Composer know where to get the code from. You can use Composer to manage your project or libraries’ dependencies. A package is connected to a GitHub repo and is made available via composer.</p><p><strong>Starting Composer</strong></p><p>You can start composer running the ```composer init``` in your project root. However, in this section, we would explore creating composer manually from the file system. Create a ```composer.json``` from your project root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*tu7jcpmY4vqD1z0BzLeLdg.png" /></figure><p>Above is a simple composer.json file</p><p><strong>What Next?</strong></p><p>Now that you have created composer in your project root follow these steps below.</p><ol><li>Create a Github repo for your package, initialize it locally and push to the remote origin.</li><li>Submit your package</li></ol><p>Now your package is online and ready for use. Your package can be added to PHP project via the composer command</p><p>`composer require username/package-name.`</p><p>You should connect your package to your Github repo so it syncs on every update.</p><p><a href="https://medium.com/backenders-club/create-your-first-ever-php-pakagist-for-composer-v-2-5118c7dd07aa">Create your first ever PHP Pakagist for Composer v.2</a></p><h3>Conclusion</h3><p>This not the end of this series. Stay tuned, and follow me for more of this series and other interesting articles.</p><p>Thank you for reading my article and my editor <a href="https://medium.com/u/8b0955f01559">Solomon Eseme</a>. Here at my <a href="https://masteringbackend.com/">blog</a> or <a href="https://bit.ly/mymediumprofile">medium</a> I regularly write about backend development, digital marketing and content management system. To read my future posts simply <a href="https://bit.ly/mymediumpublication">join my publication</a> or click ‘Follow’ Also feel free to connect with me via <a href="http://twitter.com/kaperskyguru">Twitter</a>, <a href="https://facebook.com/multimegaitschool">Facebook</a>, <a href="https://instagram.com/kaperskyguru">Instagram</a>.</p><p><em>If you are interested in backend development (or you’re internet enthusiast) both (Mobile | Web | Desktop) videos subscribe to my </em><a href="https://bit.ly/solomoneseme"><em>Youtube channel</em></a><em>, we will be posting a collection of help full tutorials and guides like this one for artisans</em>.</p><p>If you enjoy this post, make sure to let us know and share it with your friends and subscribe to my growing <a href="https://bit.ly/solomoneseme">channel</a>.</p><p>Sharing is caring.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b10e4722cb01" width="1" height="1" alt=""><hr><p><a href="https://publication.masteringbackend.com/create-your-first-ever-php-pakagist-for-composer-v-1-b10e4722cb01">Create your first ever PHP Pakagist for Composer v.1</a> was originally published in <a href="https://publication.masteringbackend.com/">MasteringBackend</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>