Skip to content

Move additionalParameters to TokenResponseAttributes #4554

@jgrandja

Description

@jgrandja

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.

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions