Framework-agnostic OAuth 2.1 JWT validation and token operations for Java resource servers.
<dependency>
<groupId>ai.authplane.sdk</groupId>
<artifactId>authplane-sdk</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>Requires Java 21+.
import ai.authplane.sdk.core.AuthplaneClient;
import ai.authplane.sdk.core.AuthplaneResource;
import ai.authplane.sdk.core.VerifiedClaims;
import java.util.List;
try (AuthplaneClient client =
AuthplaneClient.builder("https://auth.example.com").build().get()) {
AuthplaneResource verifier =
client.resource("https://api.example.com", List.of("read:data", "write:data"));
VerifiedClaims claims = verifier.verify(bearerToken).get().claims();
claims.requireScope("read:data");
String subject = claims.sub();
}Call client.close() on shutdown to clear the token cache. Background refreshes run on daemon threads and need no explicit shutdown.
Full API reference, configuration options, DPoP, token operations, introspection, token exchange, error hierarchy, and advanced usage: User Guide.