Java 17 or later, standard library only.
Install
Section titled “Install”<dependency> <groupId>com.ohauthcat</groupId> <artifactId>ohauthcat</artifactId> <version>0.0.2</version></dependency>- Create a client:
OhAuthCatClient..builder( System. getenv( "OHAUTHCAT_API_KEY")). clientId( "pk_. . . "). build( ) - Call any API operation, for example
client.. List calls have auto-paging variants such asorganizations. getOrganization( "org_. . . ") listDirectoryUsersAutoPaging. - SSO:
client.returns the URL and the PKCEssoHelpers. getAuthorizationUrl( options) codeVerifier()to keep; after the redirect,client..ssoHelpers. getProfileAndToken( code, codeVerifier, redirectUri) - Webhooks:
Webhooks.checks theverify( rawBody, signatureHeader, secret) OhAuthCat-Signatureof the raw bytes before you parse them. - Errors are
OhAuthCatExceptionsubclasses by type, such asNotFoundandRateLimited, with the stablecode(). - Set your own idempotency key with
RequestOptions..create( ). idempotencyKey( . . . )