This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $payload = [ | |
| 'iss' => 'Organization', // Issuer of the token, Organization / Product | |
| 'sub' => 'subject', // Subject of the token | |
| 'iat' => time(), // Time when JWT was issued. | |
| 'exp' => time() + 60*60 // Expiration time | |
| ... | |
| 'user' => ..., | |
| 'desc' => ..., | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import axios from "axios"; | |
| import store from "@/store"; | |
| import { | |
| cacheAdapterEnhancer, | |
| throttleAdapterEnhancer | |
| } from "axios-extensions"; | |
| const axios_instance = axios.create({ | |
| baseURL: your-api-url, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| use Firebase\JWT\JWT; | |
| use Firebase\JWT\ExpiredException; | |
| class JWTMiddleware | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo '--- --- --- --- --- --- --- --- --- --- ---' | |
| echo 'Deploying site...' | |
| echo '--- --- --- --- --- --- --- --- --- --- ---' | |
| while read oldrev newrev refname | |
| do | |
| branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
| # Master Branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function handle($request, Closure $next) | |
| { | |
| // Get the response | |
| $response = $next($request); | |
| $content = $response->getContent(); | |
| if($content AND (is_array($content) OR is_object($content)) ){ | |
| // Calculate execution time | |
| $executionTime = microtime(true) - LUMEN_START; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #/usr/local/bin/composer | |
| #/usr/bin/php | |
| echo '--- --- --- --- --- --- --- --- --- --- ---' | |
| echo 'Deploying site...' | |
| echo '--- --- --- --- --- --- --- --- --- --- ---' | |
| while read oldrev newrev refname | |
| do |