HomeDevCentral

Model UserExternalSource to link with external accounts

Description

Model UserExternalSource to link with external accounts

Summary:
The model UserExternalSource allows to track relationships
between local user and external providers users:

The claim "Our local user_id N matches GitHub user_id M"
is a property maintained in a specific users_external_sources
table, and available through UserExternalSource.

A new method User::tryGetFromExternalSource allows to fetch
the local user from an external source name and user_id.

Test Plan:
Migration

Tested through ./artisan migrate.

Unit

  • Non data destructive unit test for tryGetFromExternalSource not found case
  • Manual test for tryGetFromExternalSource found case

Integration

  • Add a record between a GitHub account and a user id account
  • Implemented in AuthController external login
  • Successfully logged in

Reviewers: dereckson

Differential Revision: http://devcentral.nasqueron.org/D432

Details

Provenance
derecksonAuthored on Jun 28 2016, 22:48
Differential Revision
D432: Model UserExternalSource to link with external accounts
Parents
rGROVE29e1ef362b84: Whitespace issues
Branches
Unknown
Tags
Unknown
Tasks
T336: Add login capabilities through external services