-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Override AuthorizationServer to use customised BearerTokenResponse #903
Comments
Hi Alex, please feel free to make a PR for this 🙂 Note that there are a number of related issues currently open and some PRs too. So it may be that this change makes its way into a bigger release. |
While looking at making a PR for making the addition of information to JWT's easier, I found the solution to this problem as well. Line 66 seems to be a documentation error, you should pass in the responseType (linking to your implementation of BearerTokenResponse) as the last parameter when creating the AuthorizationServer, instead of overwriting elements of that class. The documentation block should be changed to reflect that. |
Hi! I think I have the same problem when trying to use oauth2-openid-server (steverhoades/oauth2-openid-connect-server#21), the Implicit Grant completley disregards the responseType, so I don't know how to add the id_token response required in OpenID except creating a new OidcImplicitGrant, wich feels wrong.... |
Hey @gingabeard and @Richard87. The way you would normally do this is as follows:
If you implement your custom response like this. It should resolve your issue. I will mark this as resolved but if this doesn't solve your issue, please feel free to get back and I will reopen this issue. Thanks |
Hey guys
I wanted to put a user_id in the token response, and line 66 of BearerTokenResponse says:
/**
* Add custom fields to your Bearer Token response here, then override
* AuthorizationServer::getResponseType() to pull in your version of
* this class rather than the default.
This doesn't work though, as AuthorizationServer->encryptionKey, which is used in
AuthorizationServer::getResponseType() is declared private.
Any chance it could be updated to protected to enable this modification please?
Cheers
Alex
The text was updated successfully, but these errors were encountered: