Yusra H. 판매

OpenAPI-generated SDKs for Ory Kratos, Keto, and the Ory Network, covering identity management, permissions, and OAuth2. Available for Go, Java, Python, Ruby, PHP, TypeScript, Rust, Dart, Elixir, and .NET.
This block provides generated SDK clients for Ory Kratos (Ory Identities) across multiple languages, with TypeScript and TypeScript-Fetch being the primary variants for Node.js/browser use. It targets backend and fullstack developers who run self-hosted Ory Kratos instances and need typed API access for identity management, authentication flows, session handling, and courier operations.
dart/ - Dart/Flutter SDK client for Ory Identities APIelixir/ - Elixir SDK clientgo/ - Go SDK clientjava/ - Java SDK clientphp/ - PHP SDK client (Packagist-publishable)python/ - Python SDK client (PyPI-publishable)ruby/ - Ruby gem SDK clientrust/ - Rust crate SDK clienttypescript/ - TypeScript SDK using axios, re-exports api and configuration modulestypescript-fetch/ - TypeScript SDK using the native fetch API, exports runtime, all APIs, and all models# For typescript-fetch variant (recommended for Node 18+ and modern browsers)
npm install
# No additional runtime dependencies are declared in the SDK package.json.
# The typescript-fetch variant relies on the global fetch API (Node 18+ or browser).
# The typescript (axios) variant requires axios if used directly:
npm install axios
If targeting Node.js versions below 18, polyfill fetch:
npm install node-fetch
# Then: import fetch from 'node-fetch'; (globalThis.fetch = fetch as any)
No native build steps, pod installs, or Android linking required for the TypeScript variants.
source/typescript-fetch/src/ into your project, e.g. src/kratos/.tsconfig.json to include the new path:{
"compilerOptions": {
"paths": {
"@kratos/*": ["./src/kratos/*"]
},
"moduleResolution": "node",
"target": "ES2020",
"lib": ["ES2020", "DOM"]
}
}
KRATOS_PUBLIC_URL=https://your-kratos-instance/.ory/kratos/public
KRATOS_ADMIN_URL=https://your-kratos-admin:4434
격리된 샌드박스를 띄워 서버에서 바로 실행하세요 — 로컬 설정 불필요.
이 버전에 대한 Tetrees AI Review
This Java, PHP, Ruby, Dart, Python, TypeScript, Rust, Elixir cli / script completed archive review. Structure, dependency manifests, documentation, functional source, and common risk patterns were checked by the Tetrees verification pipeline; runtime phases are stated separately.
Deterministic AVCP artifact review
파이프라인 avcp-2026-08-04.1 · SHA-256 f1cb8723f768f36f…
This version-scoped review deterministically inspects the submitted archive for structure, dependencies, documentation, functional source, and common malicious or high-risk signals. Build and test phases are reported as passed only after an isolated sandbox audition. It is not a guarantee of perfect security.
검토일 2026년 8월 4일
이 제품을 AI IDE, 웹 빌더 또는 클라우드 IDE로 바로 가져오세요.
Tetrees를 호환 AI IDE에 연결해 보유 제품을 불러오고, 판매자 업로드 권한을 노출하지 않은 채 검증된 ZIP을 받으세요.
아직 리뷰가 없습니다.
토론을 불러오는 중…
Configuration object pointing to the correct base URL:import { Configuration, FrontendApi, IdentityApi } from './src/kratos';
const publicConfig = new Configuration({ basePath: process.env.KRATOS_PUBLIC_URL });
const adminConfig = new Configuration({ basePath: process.env.KRATOS_ADMIN_URL });
export const frontendApi = new FrontendApi(publicConfig);
export const identityApi = new IdentityApi(adminConfig);
typescript/ (axios) variant, import from source/typescript/ instead; the entry point is index.ts which re-exports ./api and ./configuration.import { FrontendApi, Configuration } from './src/kratos';
const api = new FrontendApi(new Configuration({ basePath: '...' }));
Handles all self-service flows exposed on the public Kratos endpoint: login, registration, recovery, verification, settings, and session management. Use this from your frontend or BFF (backend-for-frontend) to initiate and submit flows on behalf of end users.
import { IdentityApi, Configuration } from './src/kratos';
const api = new IdentityApi(new Configuration({ basePath: '...' }));
Admin-level API for CRUD operations on identities, credential management, session listing, and batch patching. Use this from your backend services only - never expose the admin endpoint to clients.
import { CourierApi, Configuration } from './src/kratos';
const api = new CourierApi(new Configuration({ basePath: '...' }));
Provides access to the Kratos courier subsystem for inspecting message delivery status and dispatch logs. Use when debugging email/SMS delivery issues or building admin dashboards that surface delivery failures.
Retrieve the session associated with an incoming request cookie and attach the identity to req.user. This is the standard BFF pattern for server-rendered apps.
import { FrontendApi, Configuration } from './src/kratos';
import type { Request, Response, NextFunction } from 'express';
const frontend = new FrontendApi(
new Configuration({ basePath: process.env.KRATOS_PUBLIC_URL! })
);
export async function sessionMiddleware(req: Request, res: Response, next: NextFunction) {
try {
const session = await frontend.toSession({
cookie: req.headers.cookie,
});
(req as any).user = session.data.identity;
next();
} catch {
res.status(401).json({ error: 'Unauthorized' });
}
}
Programmatically provision an identity (e.g. during onboarding or user import) using the IdentityApi. Requires admin endpoint access.
import { IdentityApi, Configuration } from './src/kratos';
const identityApi = new IdentityApi(
new Configuration({ basePath: process.env.KRATOS_ADMIN_URL! })
);
async function provisionUser(email: string) {
const response = await identityApi.createIdentity({
createIdentityBody: {
schema_id: 'default',
traits: { email },
},
});
console.log('Created identity:', response.data.id);
return response.data;
}
provisionUser('newuser@example.com').catch(console.error);
Check whether a verification or recovery email was delivered successfully. Useful in admin tooling or automated tests.
import { CourierApi, Configuration } from './src/kratos';
const courierApi = new CourierApi(
new Configuration({ basePath: process.env.KRATOS_ADMIN_URL! })
);
async function checkRecentMessages() {
const response = await courierApi.listCourierMessages({
pageSize: 10,
});
for (const msg of response.data) {
console.log(`[${msg.status}] ${msg.type} -> ${msg.recipient} at ${msg.created_at}`);
}
}
checkRecentMessages().catch(console.error);
typescript/ - Axios-based TypeScript client; entry point index.ts re-exports ./api (all API classes) and ./configuration (the Configuration class). Use when your project already depends on axios.typescript-fetch/ - Fetch-based TypeScript client; entry point src/index.ts re-exports runtime (middleware, fetch utilities), apis/index (CourierApi, FrontendApi, IdentityApi, MetadataApi), and models/index (all DTO types). Preferred for Node 18+ and browser environments.dart/ - Dart/Flutter SDK; published to pub.dev. See dart/pubspec.yaml for version and dart/lib/ for sources.elixir/ - Elixir SDK client with Mix-based packaging.go/ - Go module SDK client; import paths follow the Go module declared inside.java/ - Java SDK client with Maven/Gradle build support.php/ - PHP SDK client; install via Composer from the dart/ sibling directory pattern.python/ - Python SDK client; install via pip/twine from setup.py.ruby/ - Ruby gem SDK client; publish via gem push.rust/ - Rust crate SDK client; use via cargo.fetch not defined in Node < 18: The typescript-fetch variant uses the global fetch. Fix: npm install node-fetch and assign globalThis.fetch = require('node-fetch') before importing SDK classes.IdentityApi and CourierApi require the admin port (default 4434); FrontendApi requires the public port (default 4433). Mixing them causes 404 or 401 errors. Fix: maintain two Configuration instances.v25.4.0. If your Kratos instance is a different version, field names or endpoints may not match. Fix: regenerate using the spec matching your deployed version.moduleResolution incompatibility: The typescript-fetch sources use ES module-style re-exports. Fix: set "moduleResolution": "node16" or "bundler" in tsconfig.json if you encounter resolution errors.cookie header in server-side session check: toSession requires the session cookie forwarded from the browser request. Fix: always pass cookie: req.headers.cookie explicitly; do not rely on automatic cookie jars.I have dropped the Ory Kratos SDK source into my project at `src/kratos/`
(originally from `source/typescript-fetch/src/`). I also have USAGE.md
describing the full API. The upstream package is `ory-kratos-client`.
Please help me integrate this SDK into my existing Express + TypeScript project step by step:
1. Read USAGE.md and the source files in `src/kratos/` to understand all available exports.
2. Create a `src/lib/kratos.ts` file that instantiates `FrontendApi`, `IdentityApi`,
and `CourierApi` using environment variables `KRATOS_PUBLIC_URL` and `KRATOS_ADMIN_URL`.
3. Add an Express middleware that validates the session cookie using `FrontendApi.toSession()`
and attaches the identity to `req.user`.
4. Add a POST `/admin/users` route that creates a new identity via `IdentityApi.createIdentity()`.
5. Ensure all TypeScript types from `src/kratos/models/index` are used correctly.
6. Do not invent any API methods; only use exports visible in `src/kratos/apis/index.ts`
and `src/kratos/models/index.ts`.
The SDK clients are generated from the Ory Identities OpenAPI specification and are distributed under the Apache 2.0 license (see source/typescript-fetch/LICENSE or source/typescript/LICENSE if present). Source and upstream documentation: https://github.com/ory/sdk and https://www.ory.sh/docs/sdk. Contact: user@example.com
This product’s unique contribution is clean room implementation of valuable code block into AVCP compatible standard.
전체 설치 가이드와 연동 프롬프트는 구매 후 열람할 수 있습니다.
Automation, Utilities & Developer Tools
무료