Coder Social home page Coder Social logo

oc-jwt-auth's People

Contributors

gpasztor87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

oc-jwt-auth's Issues

Two user models

I have two user models. Front and back-end. I use this plugin with your oc-api-plugin. Is it possible to create two kind of API's. So each model uses one API. Or can I add multiple user models to the config file? Then I would make my own logic to check which user is front or back-end.

Add implementation guide

This plugin looks good, but it would really benefit from an implementation guide. Even just a README.md would be really helpful.

installing and routing problems

hi,

after composer install I tried to:

[09:00 PM]-[vagrant@machine1]-[/var/www/www.server.local] $ php artisan vendor:publish --provider="Autumn\JWTAuth\ServiceProvider"

but:

Nothing to publish for tag [].

then I inserted this by hand:

config/app.php:

`
'providers' => array_merge(include(base_path('modules/system/providers.php')), [

    // 'Illuminate\Html\HtmlServiceProvider', // Example

    'System\ServiceProvider',
    'Autumn\JWTAuth\ServiceProvider',
]),`

then after a php artisan cache:clear I was able to:

php artisan jwt:generate
jwt-auth secret [PSC0zVUxPpcRjP3tOtNEJkj3mVfAlgho] set successfully.

Now when I try to POST username and password to /auth/login with Postman I get a 404.
POSTing to /v1/auth/login also returns 404.

The routes file ist standard:

`$api = app('Dingo\Api\Routing\Router');

$api->version('v1', function ($api) {
$api->post('auth/login', 'Autumn\JWTAuth\Http\Controllers\AuthController@authenticate');
$api->post('auth/register', 'Autumn\JWTAuth\Http\Controllers\AuthController@register');
});`

Did I missed something?

Dingo API support

Great plugin, thanks!
It might be out of scope, but I was wondering if there is an easy way to integrate Dingo API?

still trouble installing

i got this

In Application.php line 635:

Class 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' not found

on this step

php artisan vendor:publish --provider="Autumn\JWTAuth\ServiceProvider"

pls advise

trouble in the step jwt generate

during this php artisan jwt:generate

i got this

Method Tymon\JWTAuth\Commands\JWTGenerateCommand::handle() does not exist

did i missed something.. pls advise

It seems 'GetUserFromToken' middleware don't take effect...

After install the plugin, I have tested login and register interface, both work, great.

When I tried to make some API call with token(after login call), it returns not authorized.

I dug into source code, find that in JWTServiceProvider.php authentication related middle-ware is registed:

    $this->registerMiddleware('jwt.auth', 'Tymon\JWTAuth\Middleware\GetUserFromToken');

This file exist at "plugins\autumn\jwtauth\vendor\tymon\jwt-auth\src\Middleware\GetUserFromToken.php".

It seems when an API is called, this file should be invoked. So I try to modify it (make some obvious errors in it) , nothing happens.

I'm confused. Any suggestion will be appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.