How to get authenticated identity in api services?

I need to return authenticated response of the api which need to be authorised token. I tried to pass UserRequest like it is done in app-api while logout. But it did not work.

What is the best centralise way to execute authentication for different APIs?

Thanks in Advance.


TJangra

I’ve found the solution for the time being. I was not passing Authentication middleware in authorised Route.

Let me know if I am wrong?

Thanks


TJangra

1 Like

Yes, the middleware is what is setting the identitly. You’re correct.

1 Like