Created
December 13, 2019 00:08
-
-
Save paulobunga/809db74aa22d1915affc18fdfdfcd77a to your computer and use it in GitHub Desktop.
Our test controller
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 defined('BASEPATH') OR exit('No direct script access allowed'); | |
use \Firebase\JWT\JWT; | |
Class Test extends CI_Controller | |
{ | |
public function index() | |
{ | |
$key = "example_key"; | |
$token = array( | |
"iss" => "http://example.org", | |
"aud" => "http://example.com", | |
"iat" => 1356999524, | |
"nbf" => 1357000000 | |
); | |
$jwt = JWT::encode($token, $key); | |
echo $jwt; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment