Page MenuHomeDevCentral

Model UserExternalSource to link with external accounts
ClosedPublic

Authored by dereckson on Jun 28 2016, 13:22.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 25, 12:50
Unknown Object (File)
Tue, Jun 25, 03:07
Unknown Object (File)
Tue, Jun 25, 02:02
Unknown Object (File)
Mon, Jun 24, 21:42
Unknown Object (File)
Mon, Jun 24, 20:09
Unknown Object (File)
Mon, Jun 24, 20:00
Unknown Object (File)
Mon, Jun 24, 19:58
Unknown Object (File)
Mon, Jun 24, 15:13
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 602
Build 718: 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
31

.

44

.

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.