Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save malithie/24b57c9a8eafbf2c30ed7becf8d54110 to your computer and use it in GitHub Desktop.
Save malithie/24b57c9a8eafbf2c30ed7becf8d54110 to your computer and use it in GitHub Desktop.
asyncapi: 3.0.0
info:
title: Asgardeo Events API
version: 2.0.0
description: |
Webhook-based event delivery for Asgardeo. Supports multiple event types from login,
registration, credential updates, profile updates, and session revocations.
servers:
default:
protocol: https
host: websubhub.asgardeo.io/hub
description: Subscriber webhook endpoint
channels:
registrationSuccess:
address: https://schemas.identity.wso2.org/events/registrations/event-type/registrationSuccess
messages:
registrationSuccessEvent:
$ref: '#/components/messages/RegistrationSuccess'
registrationFailed:
address: https://schemas.identity.wso2.org/events/registrations/event-type/registrationFailed
messages:
registrationFailedEvent:
$ref: '#/components/messages/RegistrationFailed'
loginSuccess:
address: https://schemas.identity.wso2.org/events/logins/event-type/loginSuccess
messages:
loginSuccessEvent:
$ref: '#/components/messages/LoginSuccess'
loginFailed:
address: https://schemas.identity.wso2.org/events/logins/event-type/loginfailed
messages:
loginFailedEvent:
$ref: '#/components/messages/LoginFailed'
operations:
registrationSuccessEvent:
action: send
channel:
$ref: '#/channels/registrationSuccess'
messages:
- $ref: '#/channels/registrationSuccess/messages/registrationSuccessEvent'
registrationFailedEvent:
action: send
channel:
$ref: '#/channels/registrationFailed'
messages:
- $ref: '#/channels/registrationFailed/messages/registrationFailedEvent'
loginSuccessEvent:
action: send
channel:
$ref: '#/channels/loginSuccess'
messages:
- $ref: '#/channels/loginSuccess/messages/loginSuccessEvent'
loginFailedEvent:
action: send
channel:
$ref: '#/channels/loginFailed'
messages:
- $ref: '#/channels/loginFailed/messages/loginFailedEvent'
components:
messages:
LoginSuccess:
name: LoginSuccess
title: Login Success Event
summary: Inform about a user login in the system
contentType: application/json
payload:
allOf:
- $ref: '#/components/schemas/GenricSecurityEvent'
- type: object
properties:
event:
type: object
properties:
https://schemas.identity.wso2.org/events/logins/event-type/loginSuccess:
$ref: '#/components/schemas/LoginSuccessPayload'
LoginFailed:
name: LoginFailed
title: Login Failed Event
summary: Inform about a user login failed in the system
contentType: application/json
payload:
allOf:
- $ref: '#/components/schemas/GenricSecurityEvent'
- type: object
properties:
event:
type: object
properties:
https://schemas.identity.wso2.org/events/logins/event-type/loginfailed:
$ref: '#/components/schemas/LoginFailedPayload'
RegistrationSuccess:
name: RegistrationSuccess
title: Registration Success Event
summary: Inform about a user registration in the system
contentType: application/json
payload:
allOf:
- $ref: '#/components/schemas/GenricSecurityEvent'
- type: object
properties:
event:
type: object
properties:
https://schemas.identity.wso2.org/events/registrations/event-type/registrationSuccess:
$ref: '#/components/schemas/RegistrationSuccessPayload'
RegistrationFailed:
name: RegistrationFailed
title: Registration Failed Event
summary: Inform about a user registration failed in the system
contentType: application/json
payload:
allOf:
- $ref: '#/components/schemas/GenricSecurityEvent'
- type: object
properties:
event:
type: object
properties:
https://schemas.identity.wso2.org/events/registrations/event-type/registrationFailed:
$ref: '#/components/schemas/RegistrationFailedPayload'
schemas:
GenricSecurityEvent:
type: object
properties:
iss:
type: string
description: Name of the issuer.
example: https://websubhub.asgardeo.io/t/myorg
jti:
type: string
description: Event id.
example: e3dca90f-e1e3-4f4b-83e4-5743ecce570d
iat:
type: string
description: Issued timestamp of the event.
example: 1659739261508
aud:
type: string
description: Flow id or request id.
example: https://hubspot.com/t/hubsoptorg
txn:
type: string
description: Audience of the event.
example: 5f6e4d8a9c4b3a7d2e1f0b1a
toe:
type: string
description: Time of Event.
example: 1659739261508
RegistrationSuccessPayload:
type: object
properties:
initiatorType:
type: string
example: admin
action:
type: string
example: invite
user:
type: object
additionalProperties: false
properties:
id:
type: string
example: 'wffwefefef23133e4'
claims:
type: array
description: A list of authentication steps
items:
$ref: '#/components/schemas/userClaims'
roles:
type: array
description: A list of roles of the user
items:
type: string
example: user-manager
groups:
type: array
description: A list of groups of the user
items:
type: string
example: Administrator
ref:
type: string
example: https://api.asg.io/t/myorg/scim2/Users/36a4541a-1055-4986-872c-cdf2faa7a468
organization:
type: object
additionalProperties: false
properties:
id:
type: string
example: 'a44e0dc4-d14e-43f5-a33c-b62002cf6b75'
name:
type: string
example: myorg
userStore:
type: object
additionalProperties: false
properties:
id:
type: string
example: DEFAULT
name:
type: string
example: DEFAULT
application:
type: object
additionalProperties: false
properties:
id:
type: string
example: a3d7692a-aca9-422b-a5ef-e6c6ef876feb
name:
type: string
example: My Account
registrationMethods:
type: array
description: A list of registration methods
items:
type: string
example: google
credentialsEnrolled:
type: array
description: A list of credentials enrolled
items:
type: string
example: totp
RegistrationFailedPayload:
type: object
properties:
initiatorType:
type: string
example: admin
action:
type: string
example: invite
user:
type: object
additionalProperties: false
properties:
id:
type: string
example: 'wffwefefef23133e4'
claims:
type: array
description: A list of authentication steps
items:
$ref: '#/components/schemas/userClaims'
roles:
type: array
description: A list of roles of the user
items:
type: string
example: user-manager
groups:
type: array
description: A list of groups of the user
items:
type: string
example: Administrator
ref:
type: string
example: https://api.asg.io/t/myorg/scim2/Users/36a4541a-1055-4986-872c-cdf2faa7a468
organization:
type: object
additionalProperties: false
properties:
id:
type: string
example: 'a44e0dc4-d14e-43f5-a33c-b62002cf6b75'
name:
type: string
example: myorg
userStore:
type: object
additionalProperties: false
properties:
id:
type: string
example: DEFAULT
name:
type: string
example: DEFAULT
application:
type: object
additionalProperties: false
properties:
id:
type: string
example: a3d7692a-aca9-422b-a5ef-e6c6ef876feb
name:
type: string
example: My Account
reason:
type: object
additionalProperties: false
properties:
id:
type: string
example: ABA-60001
message:
type: string
example: TOTP authentication failed
LoginSuccessPayload:
type: object
properties:
user:
type: object
additionalProperties: false
properties:
id:
type: string
example: 'wffwefefef23133e4'
claims:
type: array
description: A list of authentication steps
items:
$ref: '#/components/schemas/userClaims'
ref:
type: string
example: https://api.asg.io/t/myorg/scim2/Users/36a4541a-1055-4986-872c-cdf2faa7a468
organization:
type: object
additionalProperties: false
properties:
id:
type: string
example: 'a44e0dc4-d14e-43f5-a33c-b62002cf6b75'
name:
type: string
example: myorg
userStore:
type: object
additionalProperties: false
properties:
id:
type: string
example: DEFAULT
name:
type: string
example: DEFAULT
application:
type: object
additionalProperties: false
properties:
id:
type: string
example: a3d7692a-aca9-422b-a5ef-e6c6ef876feb
name:
type: string
example: My Account
authenticationMethods:
type: array
description: A list of authentication methods
items:
type: string
example: google
LoginFailedPayload:
type: object
properties:
user:
type: object
additionalProperties: false
properties:
id:
type: string
example: 'wffwefefef23133e4'
claims:
type: array
description: A list of authentication steps
items:
$ref: '#/components/schemas/userClaims'
ref:
type: string
example: https://api.asg.io/t/myorg/scim2/Users/36a4541a-1055-4986-872c-cdf2faa7a468
organization:
type: object
additionalProperties: false
properties:
id:
type: string
example: 'a44e0dc4-d14e-43f5-a33c-b62002cf6b75'
name:
type: string
example: myorg
userStore:
type: object
additionalProperties: false
properties:
id:
type: string
example: DEFAULT
name:
type: string
example: DEFAULT
application:
type: object
additionalProperties: false
properties:
id:
type: string
example: a3d7692a-aca9-422b-a5ef-e6c6ef876feb
name:
type: string
example: My Account
reason:
type: object
additionalProperties: false
properties:
id:
type: string
example: ABA-60001
message:
type: string
example: TOTP authentication failed
userClaims:
type: object
properties:
uri:
type: string
example: http://wso2.org/claims/emailaddress
value:
type: string
example: john@gmail.com
additionalProperties: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment