-
Notifications
You must be signed in to change notification settings - Fork 45
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
andrewpai
wants to merge
1
commit into
main
Choose a base branch
from
connector-json
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
|
||
|
14 changes: 14 additions & 0 deletions
14
astro/src/content/json/connectors/generic-auth-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"applicationId": "d37b1de2-a7ec-4c36-ad85-959402cd3fb9", | ||
"eventInfo": { | ||
"deviceName": "macOS Safari", | ||
"deviceType": "BROWSER", | ||
"ipAddress": "192.168.17.223", | ||
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15" | ||
}, | ||
"loginId": "richard@example.com", | ||
"newDevice": false, | ||
"noJWT": false, | ||
"password": "password" | ||
} | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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 ametadata
object, and adevice
object inside of that, which has some fields that the metadata call doesn't (e.g. metadata.device.description).There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.