Skip to content
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

Move additionalParameters to TokenResponseAttributes #4554

Closed
jgrandja opened this issue Sep 19, 2017 · 0 comments
Closed

Move additionalParameters to TokenResponseAttributes #4554

jgrandja opened this issue Sep 19, 2017 · 0 comments
Assignees
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: bug A general bug
Milestone

Comments

@jgrandja
Copy link
Contributor

The current implementation of TokenResponseAttributes.build() is as follows:

public TokenResponseAttributes build() {
	Assert.isTrue(this.expiresIn >= 0, "expiresIn must be a positive number");
	Instant issuedAt = Instant.now();
	AccessToken accessToken = new AccessToken(this.tokenType, this.tokenValue, issuedAt,
		issuedAt.plusSeconds(this.expiresIn), this.scopes, this.additionalParameters);

	TokenResponseAttributes tokenResponse = new TokenResponseAttributes();
	tokenResponse.accessToken = accessToken;
	return tokenResponse;
}

Notice that this.additionalParameters is associated with the AccessToken, which in fact, it should be associated with the TokenResponseAttributes.

The additional parameters are custom parameters (optional) that may be returned on a Successful Token Response.

@jgrandja jgrandja added type: bug A general bug in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) labels Sep 19, 2017
@jgrandja jgrandja added this to the 5.0.0.M5 milestone Sep 19, 2017
@jgrandja jgrandja self-assigned this Sep 19, 2017
@jgrandja jgrandja mentioned this issue Sep 19, 2017
28 tasks
thomasdarimont pushed a commit to thomasdarimont/spring-security that referenced this issue Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant