Relying party documentation
Quickstart
Validate the end-to-end OIDC flow in the developer sandbox before wiring the broker into your application.
Two integration paths
| Path | When to use | Discovery |
|---|---|---|
| Production RP (recommended) | Government portals and partner systems after onboarding | https://localhost:9443/oauth2/oidcdiscovery/.well-known/openid-configuration |
| Direct eID sandbox | Local conformance, seeded demo clients, /sandbox UI | https://sxm-api-stage.orangebd.com/.well-known/openid-configuration |
Sandbox login (15 minutes)
- Register your relying party or use an admin-provisioned sandbox client.
- Wait for approval — technical contact receives a one-time credential link.
- Open the developer sandbox and start OIDC login with PKCE (S256).
- Sign in with test eID
SXM-123456782and complete MFA (demo SMS OTP when enabled). - Confirm callback at
/auth/callback— exchange the code, inspect ID token claims, thenGETbroker UserInfo with the access_token (UserInfo API details). Illustrative JSON on the Claims page may show a different sampleeid; your sandbox login should return this citizen's card number (SXM-123456782) when scopeeidis granted.
Test identities
| eID (username) | Status | Use |
|---|---|---|
| SXM-123456782 | Active | Happy-path login + MFA |
| SXM-200002004 | Revoked | Login blocked |
| SXM-300003006 | Suspended | Login blocked |
Broker environment variables
After onboarding, configure your app against the broker (not the eID API directly):
WSO2_BASE_URL=https://localhost:9443
WSO2_CLIENT_ID=YOUR_CLIENT_ID
WSO2_CLIENT_SECRET=YOUR_CLIENT_SECRET
WSO2_REDIRECT_URI=https://your-app.gov.sx/auth/callback
WSO2_SCOPE="openid profile email eid"
WSO2_AUTHORIZE_URL=https://localhost:9443/oauth2/authorize
WSO2_TOKEN_URL=https://localhost:9443/oauth2/token
WSO2_USERINFO_URL=https://localhost:9443/oauth2/userinfo
WSO2_LOGOUT_URL=https://localhost:9443/oidc/logoutDone when
- Authorize redirect includes PKCE S256 and state.
- Token exchange returns id_token with stable sub.
- UserInfo GET https://localhost:9443/oauth2/userinfo returns 200 with Bearer access_token (not the id_token).
- When scope eid is granted, UserInfo includes approved eid bundle (e.g. eid, citizen_status, rp_token).
- Wrong redirect URI fails at broker (expected).
- Revoked test identity cannot complete login.