This repository has been archived by the owner on Dec 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 864
Add Generic arguments for IdentityUser and UserStore #643
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f2722c9
Exposed internals for UserManager and UserStore classes to subclasses
slaneyrw d2c82bb
Merge pull request #1 from aspnet/dev
slaneyrw b73d565
Merge remote-tracking branch 'upstream/dev' into dev
slaneyrw 77b630d
upsteam merged dev/RC1
slaneyrw 4dc39e7
Remove extraneous using statement
slaneyrw f4900d2
Added Tests
slaneyrw d820ff6
Merge pull request #2 from aspnet/dev
slaneyrw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,5 +30,16 @@ public class IdentityUserClaim<TKey> where TKey : IEquatable<TKey> | |
/// Gets or sets the claim value for this claim. | ||
/// </summary> | ||
public virtual string ClaimValue { get; set; } | ||
|
||
public virtual System.Security.Claims.Claim ToClaim() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Include the namespace instead of fully qualifying |
||
{ | ||
return new System.Security.Claims.Claim(this.ClaimType, this.ClaimValue); | ||
} | ||
|
||
public virtual void FromClaim(System.Security.Claims.Claim other) | ||
{ | ||
this.ClaimType = other.Type; | ||
this.ClaimValue = other.Value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,5 +30,10 @@ public class IdentityUserLogin<TKey> where TKey : IEquatable<TKey> | |
/// Gets or sets the of the primary key of the user associated with this login. | ||
/// </summary> | ||
public virtual TKey UserId { get; set; } | ||
|
||
public virtual UserLoginInfo ToUserLogin() | ||
{ | ||
return new UserLoginInfo(this.LoginProvider, this.ProviderKey, this.ProviderDisplayName); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for this. |
||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we call these methods something more like CreateXyzModel instead of OnBuild since these are called from OnModelCreating?