Skip to content

OAuth2AuthorizationExchange is not serializable #14402

Closed
@marcusdacoregio

Description

@marcusdacoregio

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();
	}
}

Metadata

Metadata

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