-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Allow for a configurable strategy for granting refresh_token #1430
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
Comments
@jgrandja , I was able to get refresh tokens for a public client as shown in your test case. During debugging I have seen so far, that Update:
|
@stefanocke |
@jgrandja , thanks for your feedback. I am not sure I understand your instructions.
|
Even for public (unauthenticated) clients, the In section 6, Refreshing an Access Token:
Although, the spec does not state anything about public clients, the token endpoint is a protected resource and therefore requires some form of client authentication. For public clients, the |
@jgrandja , in Section 3.2.1. we have:
IMHO MAY != MUST, so I can't rely on the "client_id" request parameter. (It is only a MUST for "authorization_code" grant type, but not for "refresh_token") But isn't this quite independent from the question regarding separating the logic into a Converter and Provider? The Converter just does the HTTP request parameter extraction and is dumb otherwise. The Provider looks up the RegisteredClient, as in your example. |
Hi @jgrandja. I have a similar scenario and wanted to create a new access token for a public client using a refresh token. Now I have taken the following example from you:
I have integrated a self-implemented The self-implemented converter returns an Here is the code from the @Override
public boolean supports(Class<?> authentication) {
return OAuth2RefreshTokenAuthenticationToken.class.isAssignableFrom(authentication);
} If I am making a mistake, I would be grateful for any help. Possibly the topic could have been discussed at Stackoverflow, but I thought that it might fit to this issue, since I take up the topic. I have now followed your example and could also create my own provider to realise the functionality. I wanted to ask out of interest if I have made a mistake or if this way cannot work. Thanks for the help or information. |
@jgrandja I am also experiencing the same problem and this is my read on the situation.
I implemented a custom Thanks again |
@stefanocke @TryAndErrorBot @mberwanger See this comment |
We should consider allowing for a configurable strategy for granting
refresh_token
.The solution should take into consideration for allowing
refresh_token
to be granted to public clients, but would be the responsibility of the consuming application to configure the strategy.Related gh-297
The text was updated successfully, but these errors were encountered: