rest-in-ci icon indicating copy to clipboard operation
rest-in-ci copied to clipboard

common function to verify token on each request

Open Parthvora-innovify opened this issue 7 years ago • 5 comments

Hello,

It would be good if you can make a common function to verify token on each request so that we don't need to write the same code again and again.

Thanks

Parthvora-innovify avatar Jul 24 '17 07:07 Parthvora-innovify

Thanks for suggestions, this project is for fun. Sorry, I'm busy right now and I don't have plan to implement verify token into middleware. Feel free to pull request.

dhanifudin avatar Jul 24 '17 10:07 dhanifudin

I have an error

Type: DomainException

Message: Unexpected control character found

Filename: C:\xampp\htdocs\api\rest-in\application\libraries\JWT.php

Line Number: 349 please, cant you help me?

rizqipermana avatar Oct 25 '17 03:10 rizqipermana

Hai @rizqipermana Please use Authentication header. Add header key: Authorization value: Your value key

Iyongbudiarso avatar Dec 18 '17 09:12 Iyongbudiarso

is this working only in host with port? Because i was set in in localhost without port , the token creation success, but i cannot access any other functions..

i was tried to with port like < http://localhost:8002/todo/index > it success.

is there any solution?

I was tried with apache2 in ubuntu

niyasali64 avatar May 30 '18 12:05 niyasali64

@niyasali64 it should works with or without port (tested on nginx and php built in). I never use apache anymore.

dhanifudin avatar May 30 '18 17:05 dhanifudin