GenAuth DocsDocuments
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Old version
Development Integration
  • API

  • SDK

    • Java

    • Node.js

    • Python

      • Installation and Usage
      • Authentication Module

      • Management Module

        • User Management

        • Organization Management

        • Role Management

        • User Group Management

        • Custom Field Management

        • Resource and Permission Management

        • 管理应用

        • 管理身份源

        • 管理安全配置

        • 管理消息服务

        • 管理 Pipeline

        • 管理 Webhook

        • 获取审计日志

        • 管理计量计费

        • 事件
  • Error Codes
  1. Development Integration
  2. /
  3. SDK
  4. /
  5. Python
  6. /
  7. Management Module

  8. /
  9. 事件

¶ Subscribe to events

  • managementClient.sub_event(event_code,receiver)

    Use WebSocket to subscribe to events generated by authing. event_code is the event code, which can be viewed in GenAuth API Explorer (opens new window).

¶ Parameters

  • event_code <string> event code

  • receiver <Receiver> custom receiver

¶ Example

client = ManagementClient(access_key_id="63f60a8e31e6ebd92080dc7d",
                     access_key_secret="00711487506bc4a92cfada3520b76d7f",
                     websocket_host="wss://events.hydra.authing-inc.co"
                     )
client.sub_event("authing.user.updated",lambda msg:{
    print(msg)
})

¶ Publish events

  • managementClient. pub_event(eventCode, data)

¶ Parameters

  • event_code <string> event code
  • data <dict> event body

¶ Example

client = ManagementClient(access_key_id="xxx",
                          host="https://core.genauth.ai",
                     access_key_secret="xxx",
                     websocket_host="wss://events.genauth.ai"
                     )
event_code = "custom_aouaw.sxytestevent"
data = {"id":"myid"}
print(client.put_event(event_code,data))
Previous article: 获取订单支付明细 Next article: Error Codes
  • Subscribe to events
  • Publish events

User identity management

Integrated third-party login
Customized authentication process

Enterprise internal management

Single sign-on
Multi-factor authentication
Permission management

Developer

Development Documentation
GitHub (opens new window)

Company

official@genauth.ai
16th Floor, Building B, Beichen Century Center, Chaoyang District, Beijing (Total)
Room 406, 4th Floor, Block B, No. 200, Tianfu Fifth Street, High-tech Zone, Chengdu (Branch)

© Beijing Steamory Technology Co., Ltd.