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

updated example connector request body json #2665

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewpai
Copy link
Collaborator

@andrewpai andrewpai commented Nov 15, 2023


@@ -98,7 +98,7 @@ To use a Generic Connector:

The request to your API endpoint will be delivered as JSON:

<JSON title="Example Request JSON" src="login/request.json" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea behind making it the same as the login request was that it is the same object, so if we leverage login/request.json, it will always be up to date.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually a little different. The webhook call contains an eventInfo object that has the device, IP address, and user agent info, while the login call has a metadata object, and a device object inside of that, which has some fields that the metadata call doesn't (e.g. metadata.device.description).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm. I'm confused, sorry. I don't understand what the webhook call has to do with this. Do you mean the generic API call?

My understanding is that both the generic connector and the login API use the LoginRequest and so should share the exact same request JSON.

What am I missing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, sorry, wires crossed in my head. Yes, they do use the same request class, but the login api doc doesn't mention event data (event though I suppose it would accept it) and the generic connector call always includes it. So I was trying to show that this was present in the generic connector call, when it wasn't in the existing login api request json file.

@@ -98,7 +98,7 @@ To use a Generic Connector:

The request to your API endpoint will be delivered as JSON:

<JSON title="Example Request JSON" src="login/request.json" />
<JSON title="Example Request JSON" src="connectors/generic-auth-request.json" />

Your application will then look up the user and verify the correct credentials were provided. Then you can return the response.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the response is out of date too. See FusionAuth/fusionauth-issues#2466 for more detail. Is that out of scope?

@mooreds
Copy link
Contributor

mooreds commented Feb 16, 2024

This was kinda superseded by #2895 (at least the response comments were).

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.

None yet

3 participants