thephpleague / oauth2-server

A spec compliant, secure by default PHP OAuth 2.0 Server
https://oauth2.thephpleague.com
MIT License
6.51k stars 1.12k forks source link

Question: Next step in the authorization server flow: extracting and validating the JWT token? #1261

Closed tomelsj closed 2 years ago

tomelsj commented 2 years ago

Hello, when you have the JWT from the oauth authorization server, what should I do next? I am not very familiar with the oauth, but I feel that I missing some step. Suppose that I want to post some data from the client to the server by the API using the JWT token, how do I validate the token on the server? How do I extract it and identify who sent the request?

Sephster commented 2 years ago

You should use the resource server class to intercept and verify that the JWT the client has is valid. Please see this section of the docs for further information. Thanks