Page MenuHomeDevCentral

Model UserExternalSource to link with external accounts
ClosedPublic

Authored by dereckson on Jun 28 2016, 13:22.
Tags
None
Referenced Files
F3111500: D432.id1050.diff
Sun, Jun 16, 19:36
Unknown Object (File)
Sun, Jun 16, 00:27
Unknown Object (File)
Sat, Jun 15, 21:14
Unknown Object (File)
Sat, Jun 15, 18:23
Unknown Object (File)
Fri, Jun 14, 19:32
Unknown Object (File)
Fri, Jun 14, 18:36
Unknown Object (File)
Thu, Jun 13, 21:13
Unknown Object (File)
Mon, Jun 10, 21:23
Subscribers
None

Details

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

Diff Detail

Repository
rGROVE Auth Grove
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson retitled this revision from to Model UserExternalSource to link with external accounts.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson edited edge metadata.

Unit test, better code documentation

dereckson edited edge metadata.

Add forgotten test in previous diff

dereckson added inline comments.
app/Models/UserExternalSource.php
32

.

45

.

dereckson edited edge metadata.
This revision is now accepted and ready to land.Jun 28 2016, 22:48
This revision was automatically updated to reflect the committed changes.