3 分钟接入身份能力Integrate identity in 3 minutes
提供标准 API、SDK 和 Quickstart 模板,覆盖登录、令牌管理、用户同步和策略配置。Use standards-based API and SDKs for login, token handling, user sync, and policy controls.
Copy-paste ComponentCopy-paste Component
# pip install smallsoft-idp
from smallsoft_idp import IdPClient
idp = IdPClient(
issuer=\"https://id.smallsoft.com.au\",
client_id=\"YOUR_CLIENT_ID\",
client_secret=\"YOUR_CLIENT_SECRET\"
)
token = idp.sign_in_with_password(email, password)
首屏示例优先展示 Python,直接满足 AI 工程团队快速接入诉求。Python-first example for immediate AI-team integration.
QuickstartQuickstart
# LangChain + Smallsoft IdP
from smallsoft_idp import IdPClient
from langchain_openai import ChatOpenAI
idp = IdPClient.from_env()
session = idp.create_agent_session(user_id=\"u_123\")
llm = ChatOpenAI(api_key=session.scoped_api_key)
LangChain 集成优先,适配 Agent 工作流与作用域令牌。Priority integration for LangChain with scoped agent tokens.
// React login component
import { SignInButton } from \"@smallsoft/idp-react\";
export default function App() {
return ;
}
前端只需几行代码即可接入登录。Drop-in sign-in with only a few lines of code.
Python SDK(优先)Python SDK (Priority)
面向 Agent 与自动化流程,支持任务级令牌和授权上下文。Built for agents and automation with task-scoped tokens.
LangChain IntegrationLangChain Integration
把 Agent 身份注入链式调用,统一审计与权限控制。Inject identity into chains with unified audit and policy control.
LlamaIndex IntegrationLlamaIndex Integration
对检索和工具访问进行细粒度身份隔离。Fine-grained identity isolation for retrieval and tool access.
Authentication APIAuthentication API
注册、登录、登出、会话续期、无密码认证。Sign-up, sign-in, logout, refresh, and passwordless APIs.
Directory & Policy APIDirectory & Policy API
用户、组织、角色与条件访问策略的统一管理接口。Unified APIs for users, organizations, roles, and access policy.
Audit API & WebhooksAudit API & Webhooks
导出身份事件并实时接收风险与策略变更通知。Export identity events and receive real-time risk/policy webhooks.