Page MenuHomeDevCentral

Model UserExternalSource to link with external accounts
ClosedPublic

Authored by dereckson on Jun 28 2016, 13:22.
Tags
None
Referenced Files
F3918352: D432.diff
Fri, Dec 20, 06:35
Unknown Object (File)
Tue, Dec 17, 17:51
Unknown Object (File)
Fri, Dec 13, 17:11
Unknown Object (File)
Fri, Dec 13, 05:43
Unknown Object (File)
Sat, Dec 7, 18:04
Unknown Object (File)
Sat, Dec 7, 06:59
Unknown Object (File)
Fri, Dec 6, 04:47
Unknown Object (File)
Mon, Dec 2, 21:06
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 Passed
Unit
Tests Passed
Branch
UserExternalSource
Build Status
Buildable 601
Build 717: arc lint + arc unit

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.