Skip to content

OAuth2AuthorizationExchange is not serializable #14402

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

Closed
marcusdacoregio opened this issue Jan 4, 2024 · 0 comments
Closed

OAuth2AuthorizationExchange is not serializable #14402

marcusdacoregio opened this issue Jan 4, 2024 · 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

@marcusdacoregio
Copy link
Contributor

marcusdacoregio commented Jan 4, 2024

The OAuth2AuthorizationExchange class should be serializable since it is used as a field of OAuth2AuthorizationCodeAuthenticationToken, which in turn implements Serializable, requiring all its fields to be serializable too.

@Test
void oauth2AuthorizationExchangeShouldBeSerializable() throws IOException {
	OAuth2AuthorizationExchange exchange = TestOAuth2AuthorizationExchanges.success();
	try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
		 ObjectOutputStream objectOutputStream = new ObjectOutputStream(baos)) {
		objectOutputStream.writeObject(exchange);
		objectOutputStream.flush();
	}
}
@marcusdacoregio marcusdacoregio added type: bug A general bug in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) labels Jan 4, 2024
@marcusdacoregio marcusdacoregio added this to the 6.1.7 milestone Jan 4, 2024
@marcusdacoregio marcusdacoregio self-assigned this Jan 4, 2024
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
Status: No status
Development

No branches or pull requests

1 participant