Okta

@crvouga/mockingbird-service-okta

Stateful Okta public vendor API emulator with native namespaces, checkpoints and test controls.

Parity: Vendor API workflows compared with the pinned Emulate package oracleIdentity56 of 56 operationsIn-process fetchNode servermockingbird-okta
$
npm install -D @crvouga/mockingbird-service-okta

Playground

Requests go to the real emulator running in this tab. State persists across requests, and the journal shows what it received. A green dot marks operations whose sample succeeds as-is; others need ids from earlier responses.

Loads the real @crvouga/mockingbird-service-okta into this tab on first send
https://example.okta.com

Send a request to see the emulator's response.

Operations

56 of 56 operations in the vendored contract are emulated.

MethodPathOperationStatus
GET/api/v1/apps/{appId}GET /api/v1/apps/:appIdGET /api/v1/apps/:appId
PUT/api/v1/apps/{appId}PUT /api/v1/apps/:appIdPUT /api/v1/apps/:appId
DELETE/api/v1/apps/{appId}DELETE /api/v1/apps/:appIdDELETE /api/v1/apps/:appId
PUT/api/v1/apps/{appId}/users/{userId}PUT /api/v1/apps/:appId/users/:userIdPUT /api/v1/apps/:appId/users/:userId
DELETE/api/v1/apps/{appId}/users/{userId}DELETE /api/v1/apps/:appId/users/:userIdDELETE /api/v1/apps/:appId/users/:userId
GET/api/v1/authorizationServers/{authServerId}GET /api/v1/authorizationServers/:authServerIdGET /api/v1/authorizationServers/:authServerId
PUT/api/v1/authorizationServers/{authServerId}PUT /api/v1/authorizationServers/:authServerIdPUT /api/v1/authorizationServers/:authServerId
DELETE/api/v1/authorizationServers/{authServerId}DELETE /api/v1/authorizationServers/:authServerIdDELETE /api/v1/authorizationServers/:authServerId
GET/api/v1/groups/{groupId}GET /api/v1/groups/:groupIdGET /api/v1/groups/:groupId
PUT/api/v1/groups/{groupId}PUT /api/v1/groups/:groupIdPUT /api/v1/groups/:groupId
DELETE/api/v1/groups/{groupId}DELETE /api/v1/groups/:groupIdDELETE /api/v1/groups/:groupId
PUT/api/v1/groups/{groupId}/users/{userId}PUT /api/v1/groups/:groupId/users/:userIdPUT /api/v1/groups/:groupId/users/:userId
DELETE/api/v1/groups/{groupId}/users/{userId}DELETE /api/v1/groups/:groupId/users/:userIdDELETE /api/v1/groups/:groupId/users/:userId
GET/api/v1/users/{userId}GET /api/v1/users/:userIdGET /api/v1/users/:userId
POST/api/v1/users/{userId}POST /api/v1/users/:userIdPOST /api/v1/users/:userId
PUT/api/v1/users/{userId}PUT /api/v1/users/:userIdPUT /api/v1/users/:userId
DELETE/api/v1/users/{userId}DELETE /api/v1/users/:userIdDELETE /api/v1/users/:userId
GET/.well-known/openid-configurationGET /.well-known/openid-configurationGET /.well-known/openid-configuration
GET/api/v1/appsGET /api/v1/appsGET /api/v1/apps
POST/api/v1/appsPOST /api/v1/appsPOST /api/v1/apps
GET/api/v1/apps/{appId}/usersGET /api/v1/apps/:appId/usersGET /api/v1/apps/:appId/users
GET/api/v1/authorizationServersGET /api/v1/authorizationServersGET /api/v1/authorizationServers
POST/api/v1/authorizationServersPOST /api/v1/authorizationServersPOST /api/v1/authorizationServers
GET/api/v1/groupsGET /api/v1/groupsGET /api/v1/groups
POST/api/v1/groupsPOST /api/v1/groupsPOST /api/v1/groups
GET/api/v1/groups/{groupId}/usersGET /api/v1/groups/:groupId/usersGET /api/v1/groups/:groupId/users
GET/api/v1/usersGET /api/v1/usersGET /api/v1/users
POST/api/v1/usersPOST /api/v1/usersPOST /api/v1/users
GET/api/v1/users/{userId}/groupsGET /api/v1/users/:userId/groupsGET /api/v1/users/:userId/groups
GET/api/v1/users/meGET /api/v1/users/meGET /api/v1/users/me
GET/oauth2/{authServerId}/.well-known/openid-configurationGET /oauth2/:authServerId/.well-known/openid-configurationGET /oauth2/:authServerId/.well-known/openid-configuration
GET/oauth2/{authServerId}/v1/authorizeGET /oauth2/:authServerId/v1/authorizeGET /oauth2/:authServerId/v1/authorize
GET/oauth2/{authServerId}/v1/keysGET /oauth2/:authServerId/v1/keysGET /oauth2/:authServerId/v1/keys
GET/oauth2/{authServerId}/v1/logoutGET /oauth2/:authServerId/v1/logoutGET /oauth2/:authServerId/v1/logout
GET/oauth2/{authServerId}/v1/userinfoGET /oauth2/:authServerId/v1/userinfoGET /oauth2/:authServerId/v1/userinfo
GET/oauth2/v1/authorizeGET /oauth2/v1/authorizeGET /oauth2/v1/authorize
GET/oauth2/v1/keysGET /oauth2/v1/keysGET /oauth2/v1/keys
GET/oauth2/v1/logoutGET /oauth2/v1/logoutGET /oauth2/v1/logout
GET/oauth2/v1/userinfoGET /oauth2/v1/userinfoGET /oauth2/v1/userinfo
POST/api/v1/apps/{appId}/lifecycle/activatePOST /api/v1/apps/:appId/lifecycle/activatePOST /api/v1/apps/:appId/lifecycle/activate
POST/api/v1/apps/{appId}/lifecycle/deactivatePOST /api/v1/apps/:appId/lifecycle/deactivatePOST /api/v1/apps/:appId/lifecycle/deactivate
POST/api/v1/authorizationServers/{authServerId}/lifecycle/activatePOST /api/v1/authorizationServers/:authServerId/lifecycle/activatePOST /api/v1/authorizationServers/:authServerId/lifecycle/activate
POST/api/v1/authorizationServers/{authServerId}/lifecycle/deactivatePOST /api/v1/authorizationServers/:authServerId/lifecycle/deactivatePOST /api/v1/authorizationServers/:authServerId/lifecycle/deactivate
POST/api/v1/users/{userId}/lifecycle/activatePOST /api/v1/users/:userId/lifecycle/activatePOST /api/v1/users/:userId/lifecycle/activate
POST/api/v1/users/{userId}/lifecycle/deactivatePOST /api/v1/users/:userId/lifecycle/deactivatePOST /api/v1/users/:userId/lifecycle/deactivate
POST/api/v1/users/{userId}/lifecycle/reactivatePOST /api/v1/users/:userId/lifecycle/reactivatePOST /api/v1/users/:userId/lifecycle/reactivate
POST/api/v1/users/{userId}/lifecycle/suspendPOST /api/v1/users/:userId/lifecycle/suspendPOST /api/v1/users/:userId/lifecycle/suspend
POST/api/v1/users/{userId}/lifecycle/unsuspendPOST /api/v1/users/:userId/lifecycle/unsuspendPOST /api/v1/users/:userId/lifecycle/unsuspend
POST/oauth2/{authServerId}/v1/authorize/callbackPOST /oauth2/:authServerId/v1/authorize/callbackPOST /oauth2/:authServerId/v1/authorize/callback
POST/oauth2/{authServerId}/v1/introspectPOST /oauth2/:authServerId/v1/introspectPOST /oauth2/:authServerId/v1/introspect
POST/oauth2/{authServerId}/v1/revokePOST /oauth2/:authServerId/v1/revokePOST /oauth2/:authServerId/v1/revoke
POST/oauth2/{authServerId}/v1/tokenPOST /oauth2/:authServerId/v1/tokenPOST /oauth2/:authServerId/v1/token
POST/oauth2/v1/authorize/callbackPOST /oauth2/v1/authorize/callbackPOST /oauth2/v1/authorize/callback
POST/oauth2/v1/introspectPOST /oauth2/v1/introspectPOST /oauth2/v1/introspect
POST/oauth2/v1/revokePOST /oauth2/v1/revokePOST /oauth2/v1/revoke
POST/oauth2/v1/tokenPOST /oauth2/v1/tokenPOST /oauth2/v1/token

Documentation

The package README, the same file that ships in the npm tarball.Edit on GitHub

Local emulators. Real API contracts. Part of Mockingbird.

OIDC discovery, JWKS, OAuth authorize/token/userinfo/introspect/revoke/logout, users, groups, apps, authorization servers. Runs through Mockingbird's portable Fetch runtime with SQLite persistence, namespaces, checkpoints, faults and admin controls.

Install

Shell
npm install @crvouga/mockingbird-service-okta

Usage

TypeScript
import okta from "@okta/okta-sdk-nodejs"
import { createServer } from "@crvouga/mockingbird-service-okta/server"

const server = await createServer({ seed: 1 })

// The app's own Okta client. Only its org URL changes.
const client = new okta.Client({ orgUrl: server.url, token: "fixture-api-token" })
const user = await client.userApi.createUser({
  body: { profile: { firstName: "Ada", lastName: "Fixture", email: "ada@example.com", login: "ada@example.com" } },
})
const found = await client.userApi.getUser({ userId: user.id ?? "" })
console.log(found.status, found.profile?.login) // "ACTIVE", "ada@example.com"
await server.close()

API

  • OktaAPI: portable provider instance; accepts SQLite, namespace, clock, fixtures and baseUrl.
  • createRuntime: shared runtime, including native namespace and checkpoint controls.
  • OKTA_NAMESPACE: default storage namespace.
  • document, operationIds, supportedOperationIds: registered provider route inventory.
  • createServer, DEFAULT_PORT, serveTarget from /server: loopback listener and CLI configuration.

fixtures accepts synthetic provider seed records. reset() restores defaults. Emulate 0.12.1 is a test oracle only, never a runtime dependency. Vendor handlers ported under Apache-2.0 retain their license and attribution; see LICENSE_EMULATE and THIRD_PARTY_NOTICES.md.

See SUPPORT.md for coverage and limits and API_EVIDENCE.md for validation status.

↑↓ to navigate↵ to open