-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lumen #91
Comments
Don't have anything specifically in mind. Although I guess it could be useful to have a lumen installation running exclusively as an authentication server for issuing and revoking JWT's etc.. I'm open to any ideas though! |
Is it possible to use this package with Lumen as is? |
it is possiable to do it, bcz tymod got a custom token function, so need to remove "auth" function for lumen |
Have someone used it with lumen and can share its job! |
Would love to see some code of this implemented into Lumen for User Auth and other auth methods. |
Would also appreciate this. |
Usage should be the same... You will just need to enable auth in lumen first - http://lumen.laravel.com/docs/authentication |
Next version ( |
<?php
namespace App\Providers;
use Tymon\JWTAuth\Providers\JWTAuthServiceProvider;
/**
* All we do here is forcing the JWTAuthServiceProvider to take
* our custom config as the only config (force Lumen compatibility,
* basically).
*/
class CustomJWTAuthServiceProvider extends JWTAuthServiceProvider
{
/**
* Boot the service provider.
*/
public function boot()
{
$this->app['config']->set('jwt', require realpath(__DIR__ . '/../../config/jwt.php'));
$this->bootBindings();
$this->commands('tymon.jwt.generate');
}
}
$app->register(
'App\Providers\CustomJWTAuthServiceProvider'
); That should do it. |
@osteel, Works like charm! Thanks! |
@tymondesigns You are doing an amazing job here! Congrats! :) Did you have any idea about how to implement "JWT as a Service" (like you said before, running exclusively as an authentication server for issuing and revoking tokens etc) with Lumen? |
@osteel many thanks |
…/nullable-ttl-phpdoc docs(PHPDoc): allow nullable token ttl
hello tymon, any plan for lumen?
thanks
The text was updated successfully, but these errors were encountered: