Skip to main content

SDK Usage

Identity Broker provides official SDKs to simplify integration with your applications.

Java SDK

Add the dependency to your pom.xml:

<dependency>
<groupId>io.identix</groupId>
<artifactId>identix-sdk-java</artifactId>
<version>1.2.0</version>
</dependency>

Usage

IdentixClient client = new IdentixClient.Builder()
.issuer("https://idp.yourdomain.com")
.clientId("your-client-id")
.clientSecret("your-client-secret")
.build();

TokenResponse token = client.getToken(authorizationCode);
UserProfile profile = client.getUserProfile(token.getAccessToken());

Node.js SDK

Install via npm:

npm install @identix/node-sdk

Usage

const { IdentixClient } = require('@identix/node-sdk');

const client = new IdentixClient({
issuer: 'https://idp.yourdomain.com',
clientId: 'your-client-id',
clientSecret: 'your-client-secret'
});

const token = await client.getToken(code);
const user = await client.getUserInfo(token.access_token);

Python SDK

Install via pip:

pip install identix-sdk

Usage

from identix import IdentixClient

client = IdentixClient(
issuer="https://idp.yourdomain.com",
client_id="your-client-id",
client_secret="your-client-secret"
)

token = client.get_token(code)
user = client.get_user_info(token['access_token'])

Go SDK

go get github.com/hubseven/nexusid-go-sdk
import nexusid "github.com/hubseven/nexusid-go-sdk"

client := nexusid.NewClient(nexusid.Config{
Issuer: "https://idp.yourdomain.com",
ClientID: "your-client-id",
})
// Validate a broker-issued token (RS256, JWKS from the issuer):
claims, err := client.VerifyToken(ctx, accessToken)
// Or guard an HTTP handler with role checks via the provided middleware.

.NET SDK

dotnet add package NexusID.SDK
using NexusID.SDK;

var client = new NexusIdClient(new NexusIdOptions {
Issuer = "https://idp.yourdomain.com",
ClientId = "your-client-id",
});
// ClaimsPrincipal extensions expose roles for [Authorize]-style checks.
var roles = principal.GetNexusRoles();

Published packages & live verification

LanguagePackageSource
JavaScript / TypeScript@nexusid/sdkpackages/nexusid-js-sdk
Pythonnexusid-sdkpackages/nexusid-python-sdk
Gonexusid-go-sdkpackages/nexusid-go-sdk
Javaio.nexusid:sdkpackages/nexusid-java-sdk
.NETNexusID.SDKpackages/nexusid-dotnet-sdk

Every SDK ships unit + framework-integration tests, and a live-vs-broker test (gated on BROKER_URL) that validates the SDK against a running broker's OIDC discovery + JWKS — runnable as a working integration example, e.g.:

BROKER_URL=http://localhost:8080 node --test packages/nexusid-js-sdk/tests/live.test.js