Scalekit is the auth stack for AI apps - from human authentication to agent authorization. Build secure AI products faster with authentication for humans (SSO, passwordless, full-stack auth) and agents (MCP/APIs, delegated actions), all unified on one platform. This Java SDK enables both traditional B2B authentication and cutting-edge agentic workflows.
- π Agent Identity: Agents as first-class actors with human ownership and org context
- π― MCP-Native OAuth 2.1: Purpose-built for Model Context Protocol with DCR/PKCE support
- β° Ephemeral Credentials: Time-bound, task-based authorization (minutes, not days)
- π Token Vault: Per-user, per-tool token storage with rotation and progressive consent
- π₯ Human-in-the-Loop: Step-up authentication when risk crosses thresholds
- π Immutable Audit: Track which user initiated, which agent acted, what resource was accessed
- π Enterprise SSO: Support for SAML and OIDC protocols
- π₯ SCIM Provisioning: Automated user provisioning and deprovisioning
- π Passwordless Authentication: Magic links, OTP, and modern auth flows
- π’ Multi-tenant Architecture: Organization-level authentication policies
- π± Social Logins: Support for popular social identity providers
- π‘οΈ Full-Stack Auth: Complete IdP-of-record solution for B2B SaaS
- Sign up for a Scalekit account.
- Get your
env_url
,client_id
andclient_secret
from the Scalekit dashboard.
- Java 1.8 or later
Add this dependency to your project's build file:
implementation "com.scalekit:scalekit-sdk-java:2.0.4"
Add this dependency to your project's POM:
<dependency>
<groupId>com.scalekit</groupId>
<artifactId>scalekit-sdk-java</artifactId>
<version>2.0.4</version>
</dependency>
Initialize the Scalekit client using the appropriate credentials. Refer code sample below.
import com.scalekit.ScalekitClient;
import com.scalekit.exceptions.APIException;
import com.scalekit.grpc.scalekit.v1.organizations.CreateOrganization;
import com.scalekit.grpc.scalekit.v1.organizations.Organization;
import com.scalekit.grpc.scalekit.v1.organizations.UpdateOrganization;
public class ScalekitExample {
public static void main(String[] args) {
client = new ScalekitClient("env_url",
"client_id",
"client_secret");
}
}
The Scalekit Java SDK is designed to operate with the following environment:
Component | Version |
---|---|
Java | 8+ |
Tip: While our Java SDK requires Java 8 as the baseline, we suggest upgrading to more recent LTS versions such as Java 11 or Java 17. These updates deliver performance improvements and enhanced security.
Below is a simple code sample that showcases how to implement Single Sign-on using Scalekit SDK
@RestController
public class AuthController {
ScalekitClient scalekitClient = client = new ScalekitClient("env_url", "client_id", "client_secret");
@Value("${auth.redirect.url}")
private String redirectUrl;
@PostMapping( path = "auth/login")
public RedirectView loginHandler() {
AuthorizationUrlOptions options = new AuthorizationUrlOptions();
String url = scalekitClient.authentication().
getAuthorizationUrl(redirectUrl, options)
.toString();
return new RedirectView(url);
}
@GetMapping("auth/callback")
public String callbackHandler(@RequestParam String code, HttpServletResponse response){
AuthenticationResponse authResponse = scalekitClient.authentication()
.authenticateWithCode(code, redirectUrl, new AuthenticationOptions());
Cookie cookie = new Cookie("access_token", authResponse.getAccessToken());
response.addCookie(cookie);
return authResponse.getIdToken();
}
}
Explore fully functional sample applications built with popular Java frameworks and the Scalekit SDK:
Framework | Repository | Description |
---|---|---|
Spring Boot | scalekit-springboot-example | Complete Spring Boot integration |
- SSO Integration - Implement enterprise Single Sign-on
- Full Stack Auth - Complete authentication solution
- Passwordless Auth - Modern authentication flows
- Social Logins - Popular social identity providers
- Machine-to-Machine - API authentication
- API Reference - Complete API documentation
- Developer Kit - Tools and utilities
- API Authentication Guide - Secure API access
- Setup Guide - Initial platform configuration
- Code Examples - Ready-to-use code snippets
- Admin Portal Guide - Administrative interface
- Launch Checklist - Pre-production checklist
This project is licensed under the MIT license.