Lux Docs
Iam

Lux IAM

Identity and access management with OAuth2, OIDC, SAML, and RBAC

Lux IAM (github.com/luxfi/iam) is the unified authentication and authorization provider for the Lux ecosystem, hosted at hanzo.id. It supports OAuth 2.0, OpenID Connect, SAML 2.0, and CAS protocols.

Architecture

┌──────────────────────────────────────────────┐
│              Lux IAM (hanzo.id)              │
│  ┌──────────┬───────────┬──────────────────┐ │
│  │ Go (Beego)│  React UI │  OAuth2/OIDC    │ │
│  └─────┬────┴─────┬─────┴───────┬─────────┘ │
│        │          │             │            │
│  ┌─────▼──┐  ┌────▼───┐  ┌─────▼──────┐     │
│  │Postgres│  │ Redis  │  │ User Store │     │
│  └────────┘  └────────┘  └────────────┘     │
└──────────────────────────────────────────────┘
        ↑              ↑              ↑
   hanzo.app     cloud.hanzo.ai    commerce

Auth Methods

MethodProtocolUse Case
OAuth 2.0Authorization Code + PKCEWeb and mobile apps
OIDCOpenID Connect 1.0SSO and identity federation
SAMLSAML 2.0Enterprise SSO
CASCAS 3.0Legacy system integration
API KeysBearer tokenMachine-to-machine

Authentication Flow

  1. User visits a Lux application (e.g. hanzo.app)
  2. Redirected to hanzo.id for OAuth login
  3. User authenticates (password, social, SAML)
  4. Redirected back with authorization code
  5. Application exchanges code for access token
  6. Token validated via IAM on each request

SDKs

// Go
import "github.com/iam/iam-go-sdk/iamsdk"

iamsdk.InitConfig("https://hanzo.id", clientID, clientSecret,
    certName, orgName, appName)
// JavaScript
import { SDK } from 'iam-js-sdk'

const sdk = new SDK({
  serverUrl: 'https://hanzo.id',
  clientId: 'your-client-id',
  appName: 'your-app',
  organizationName: 'your-org',
})

On this page