Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Webhooks for Asynchronous Events] Authentication Success Event and Failure Event Payload Generation #4

Merged
merged 23 commits into from
Aug 21, 2024

Conversation

Sachin-Mamoru
Copy link
Contributor

@Sachin-Mamoru Sachin-Mamoru commented Aug 15, 2024

Purpose

Source PR

Authentication Success

{
  "iss": "https://api.asg.io/t/testasgardeo1/",
  "jti": "bd3294b1-e562-469c-a953-760cb7e98610",
  "iat": 1721148238035,
  "rci": "fd42a0c2-db37-4fec-b07d-b8484b98e1ea",
  "event": {
    "schemas.identity.wso2.org/events/logins/event-type/loginSuccess": {
      "user": {
        "id": "07f47397-2e77-4fce-9fac-41ff509d62de",
        "claims": [
          {
            "uri": "http://wso2.org/claims/username",
            "value": "test1@test.com"
          },
          {
            "uri": "http://wso2.org/claims/mobile",
            "value": "0779438491"
          },
          {
            "uri": "http://wso2.org/claims/emailaddress",
            "value": "sachinmamoru@gmail.com"
          },
          {
            "uri": "http://wso2.org/claims/givenname",
            "value": "Test1"
          },
          {
            "uri": "http://wso2.org/claims/lastname",
            "value": "Test1"
          }
        ],
        "ref": "https://api.asg.io/t/testasgardeo1/scim2/07f47397-2e77-4fce-9fac-41ff509d62de",
        "groups": [
          "testGroup"
        ]
      },
      "tenant": {
        "id": "1",
        "name": "testasgardeo1"
      },
      "userStore": {
        "id": "REVGQVVMVA==",
        "name": "DEFAULT"
      },
      "application": {
        "id": "f27178f9-984b-41df-aee5-372de8ef327f",
        "name": "test-app"
      },
      "authenticationMethods": [
        "BasicAuthenticator",
        "sms-otp-authenticator"
      ]
    }
  }
}

Authentication Failure

{
  "iss": "https://api.asg.io/t/testasgardeo1/",
  "jti": "26b1c1df-3a93-48b7-893b-e8fb82d40c4c",
  "iat": 1721151914333,
  "rci": "a505c8f9-7405-446f-8aac-18c6601feff8",
  "event": {
    "schemas.identity.wso2.org/events/logins/event-type/loginFailed": {
      "user": {
        "id": "07f47397-2e77-4fce-9fac-41ff509d62de",
        "ref": "https://api.asg.io/t/testasgardeo1/scim2/07f47397-2e77-4fce-9fac-41ff509d62de"
      },
      "tenant": {
        "id": "1",
        "name": "testasgardeo1"
      },
      "userStore": {
        "id": "REVGQVVMVA==",
        "name": "DEFAULT"
      },
      "application": {
        "id": "f27178f9-984b-41df-aee5-372de8ef327f",
        "name": "test-app"
      },
      "reason": {
        "id": "SMS-65020",
        "failedStep": {
          "step": 2,
          "idp": "LOCAL",
          "authenticator": "sms-otp-authenticator"
        }
      }
    }
  }
}

Related Issues

Related Mails

  • The level of customizability & extensibility IAM products should support
  • [Architecture] [IS/Asgardeo] Faciliate webhooks to integrate with other systems on asynchornous operations

# Conflicts:
#	components/org.wso2.identity.webhook.wso2.event.handler/src/main/java/org/wso2/identity/webhook/wso2/event/handler/builder/WSO2LoginEventPayloadBuilder.java
# Conflicts:
#	components/org.wso2.identity.webhook.wso2.event.handler/src/main/java/org/wso2/identity/webhook/wso2/event/handler/builder/WSO2LoginEventPayloadBuilder.java
@Sachin-Mamoru Sachin-Mamoru merged commit 3bad2eb into wso2-extensions:main Aug 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants