Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(480)

Delta Between Two Patch Sets: Calendar.ASP.NET.MVC5/Models/IdentityModels.cs

Issue 194980043: Issue 6: Create an ASP.Net MVC Sample Base URL: https://google-api-dotnet-client.samples.googlecode.com/hg/
Left Patch Set: Correct base revision Created 9 years, 2 months ago
Right Patch Set: Addressed peleyal's comments Created 8 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Calendar.ASP.NET.MVC5/Models/CalendarViewModels.cs ('k') | Calendar.ASP.NET.MVC5/Properties/AssemblyInfo.cs » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 using System.Data.Entity; 1 // This file is added automatically by the MVC 5 application template.
2
3 using System.Data.Entity;
2 using System.Security.Claims; 4 using System.Security.Claims;
3 using System.Threading.Tasks; 5 using System.Threading.Tasks;
4 using Microsoft.AspNet.Identity; 6 using Microsoft.AspNet.Identity;
5 using Microsoft.AspNet.Identity.EntityFramework; 7 using Microsoft.AspNet.Identity.EntityFramework;
6 8
7 namespace Calendar.ASP.NET.MVC5.Models 9 namespace Calendar.ASP.NET.MVC5.Models
8 { 10 {
9 // You can add profile data for the user by adding more properties to your A pplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more. 11 // You can add profile data for the user by adding more properties to your A pplicationUser class, please visit
peleyal 2015/01/12 08:11:23 Please keep no more than 120 chars per lijne
jmcgrew 2015/02/20 02:53:17 Done.
12 // http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
10 public class ApplicationUser : IdentityUser 13 public class ApplicationUser : IdentityUser
11 { 14 {
12 public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager< ApplicationUser> manager) 15 public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager< ApplicationUser> manager)
13 { 16 {
14 // Note the authenticationType must match the one defined in CookieA uthenticationOptions.AuthenticationType 17 // Note the authenticationType must match the one defined in CookieA uthenticationOptions.AuthenticationType
15 var userIdentity = await manager.CreateIdentityAsync(this, DefaultAu thenticationTypes.ApplicationCookie); 18 var userIdentity = await manager.CreateIdentityAsync(this, DefaultAu thenticationTypes.ApplicationCookie);
16 // Add custom user claims here 19 // Add custom user claims here
17 return userIdentity; 20 return userIdentity;
18 } 21 }
19 } 22 }
20 23
21 public class ApplicationDbContext : IdentityDbContext<ApplicationUser> 24 public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
22 { 25 {
23 public ApplicationDbContext() 26 public ApplicationDbContext()
24 : base("DefaultConnection", throwIfV1Schema: false) 27 : base("DefaultConnection", throwIfV1Schema: false)
25 { 28 {
26 } 29 }
27 30
28 public static ApplicationDbContext Create() 31 public static ApplicationDbContext Create()
29 { 32 {
30 return new ApplicationDbContext(); 33 return new ApplicationDbContext();
31 } 34 }
32 } 35 }
33 } 36 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b