FriendsOfSymfony / oauth2-php

A server implementation of OAuth 2.0
MIT License
515 stars 112 forks source link

Override genAccessToken() #99

Open ajax13 opened 7 years ago

ajax13 commented 7 years ago

I want to use the JWT token instead of the current solution to generate the Token(random). Since @iamluc's PR #94 hasn't been accepted yet, I'm opting for this solution witch I think isn't the best way, so I need your feedbacks :

- Use the compiler pass to override the 'fos_oauth_server.server' service to point Class to my custom class that inherits from 'OAuth2'. 
- Override the 'protected function genAccessToken()' to use the JWT token service for the generation.

Any other solutions are welcome!

cored0wn commented 6 years ago

I've reviewed this PR and it would be very useful for me because i have to implement the openid connect core specification.