Skip to content

Add convenience method for invalidating an OAuth2Token #1717

@jgrandja

Description

@jgrandja

We should add a convenience method that allows for invalidating an OAuth2Token.

For example, to invalidate an access token, one would do the following:

OAuth2Authorization existingAuthorization = ...

OAuth2Authorization updatedAuthorization =
		OAuth2Authorization.from(existingAuthorization)
				.invalidate(existingAuthorization.getAccessToken().getToken())
				.build();

this.authorizationService.save(updatedAuthorization);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions