vdomah / oc-jwtauth

JWTAuth plugin for October CMS wich provides token based authentication
MIT License
27 stars 21 forks source link

add others data in the reponse #5

Closed taha-azzabi closed 6 years ago

taha-azzabi commented 6 years ago

Hello,

there is a way to add other data like user role in the header response , i know that i can modify directly the file route.php and add to $user = [ 'id' => $userModel->id, 'name' => $userModel->name, 'surname' => $userModel->surname, 'username' => $userModel->username, 'email' => $userModel->email, 'is_activated' => $userModel->is_activated, ];

there is a way to extend this file , thans

vdomah commented 6 years ago

added this feature. Docs for instructions: https://github.com/vdomah/oc-jwtauth#how-to-define-own-set-of-user-attributes-in-response