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)
Thu, Nov 14, 07:14
Unknown Object (File)
Wed, Nov 13, 22:26
Unknown Object (File)
Tue, Nov 12, 23:00
Unknown Object (File)
Sun, Nov 10, 19:29
Unknown Object (File)
Sun, Nov 10, 18:52
Unknown Object (File)
Sun, Nov 10, 16:15
Unknown Object (File)
Sun, Nov 10, 15:00
Unknown Object (File)
Sun, Nov 10, 14:32
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.