Skip to content

Commit

Permalink
add in user response to the generic connector
Browse files Browse the repository at this point in the history
This resolves the 'Also, Generally speaking, I wish there were some clickable cross-reference links between that [connector] page and the user object doc.' request.

Needed to exclude attributes from the user response that the connector response should never get.
  • Loading branch information
mooreds committed Feb 16, 2024
1 parent 43d82fc commit 8e2ebf8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions astro/src/content/docs/apis/_user-response-body.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ import UserDataEmailFieldResponse from 'src/content/docs/apis/_user-data-email-f
<APIField name="user.breachedPasswordLastCheckedInstant" type="Long">
The [instant](/docs/reference/data-types#instants) this user's password was last checked to determine if it is compromised.
</APIField>
{ (!props.connector_response) && <>
<APIField name="user.connectorId" type="UUID" since="1.18.0">
The unique Id of the [Connector](/docs/lifecycle/migrate-users/connectors/) associated with the System of Record being used to authenticate the user.
</APIField>
</>}
<APIField name="user.cleanSpeakId" type="UUID">
This Id is used by FusionAuth when the User's username is sent to CleanSpeak to be moderated (filtered and potentially sent to the approval queue). It is the **content Id** of the username inside CleanSpeak.
</APIField>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Aside from 'src/components/Aside.astro';
import StandardPostResponseCodes from 'src/content/docs/apis/_standard-post-response-codes.astro';
import SystemOfRecordCaveat from 'src/content/docs/lifecycle/migrate-users/connectors/_system-of-record-caveat.mdx';
import SecuringHttpRequests from 'src/content/docs/_shared/_securing_http_requests.mdx';
import UserResponseBody from 'src/content/docs/apis/_user-response-body.mdx';

## Overview

Expand Down Expand Up @@ -104,12 +105,14 @@ Your application will then look up the user and verify the correct credentials w

### Response

Your API should return a valid FusionAuth `user` object with status code `200` if the user is found and authenticated. Note that while you may return any of the attributes of the user object, including nested objects such as application registrations with roles, only the required ones must be returned. The only other status code FusionAuth will accept from your connector is a `404`.
Your API should return a valid FusionAuth `user` object with status code `200` if the user is found and authenticated.

While you may return any of the attributes of the user object, including nested objects such as application registrations with roles, only the required ones must be present. The only other status code FusionAuth will accept from your connector is a `404`.

<Aside type="caution">
A valid user object must be returned with a FusionAuth compatible UUID in the <InlineField>user.id</InlineField>. This is a requirement whether you are [authenticating but not migrating a user](/docs/lifecycle/migrate-users/connectors/#required-fields) or [migrating a user](/docs/lifecycle/migrate-users/connectors/#required-fields-1).

When you are authenticating but not migrating a user,the <InlineField>user.id</InlineField> must be the same across subsequent logins.
When you are authenticating but not migrating a user, the <InlineField>user.id</InlineField> must be the same across subsequent logins.
</Aside>

If the user cannot be authenticated, then you should return a `404`.
Expand All @@ -118,7 +121,7 @@ If the user cannot be authenticated, then you should return a `404`.

<StandardPostResponseCodes never_search_error missing_message="To prevent enumeration attacks, a 404 is returned for any non 200 status code returned from your connector." omit_internal_error omit_missing_header omit_error_malformed />


<UserResponseBody connector_response />

<JSON title="Example Successful Response JSON" src="users/login-migrated-response.json" />

Expand Down

0 comments on commit 8e2ebf8

Please sign in to comment.