This project provides a Jersey client feature that handles OAuth2 access tokens (fetching/caching/refreshing + adding Authorization header) using the Vert.x library.
It currently supports the Client Credentials flow. Feel free to submit a PR to implement PASSWORD or AUTH_CODE flow.
This package can be imported using JitPack or throw GitHub Packages.
e.g.
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.AllTheDucks:oauth2-jersey-client-filter:Tag'
}
or
<dependency>
<groupId>com.alltheducks</groupId>
<artifactId>oauth2-jersey-client-filter</artifactId>
<version>1.0.1</version>
</dependency>
mvn install
- Git tag a new version e.g.
git tag v1.1.5 - In Github, draft a new release from the tag (this will trigger a Github Action that allows Jitpack to bundle the new version)