-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separar clases dentro de IdentityConfig.cs
- Loading branch information
1 parent
4f4ea67
commit 30a39d0
Showing
6 changed files
with
69 additions
and
46 deletions.
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
27 changes: 27 additions & 0 deletions
27
ApplicantTracking.Data/Identity/ApplicationSignInManager.cs
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Security.Claims; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNet.Identity.Owin; | ||
using Microsoft.Owin; | ||
using Microsoft.Owin.Security; | ||
|
||
namespace ApplicantTracking.Data.Identity | ||
{ | ||
// Configure the application sign-in manager which is used in this application. | ||
public class ApplicationSignInManager : SignInManager<ApplicationUser, string> | ||
{ | ||
public ApplicationSignInManager(ApplicationUserManager userManager, IAuthenticationManager authenticationManager) | ||
: base(userManager, authenticationManager) | ||
{ | ||
} | ||
|
||
public override Task<ClaimsIdentity> CreateUserIdentityAsync(ApplicationUser user) | ||
{ | ||
return user.GenerateUserIdentityAsync((ApplicationUserManager)UserManager); | ||
} | ||
|
||
public static ApplicationSignInManager Create(IdentityFactoryOptions<ApplicationSignInManager> options, IOwinContext context) | ||
{ | ||
return new ApplicationSignInManager(context.GetUserManager<ApplicationUserManager>(), context.Authentication); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNet.Identity; | ||
|
||
namespace ApplicantTracking.Data.Identity | ||
{ | ||
public class EmailService : IIdentityMessageService | ||
{ | ||
public Task SendAsync(IdentityMessage message) | ||
{ | ||
// Plug in your email service here to send an email. | ||
return Task.FromResult(0); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNet.Identity; | ||
|
||
namespace ApplicantTracking.Data.Identity | ||
{ | ||
public class SmsService : IIdentityMessageService | ||
{ | ||
public Task SendAsync(IdentityMessage message) | ||
{ | ||
// Plug in your SMS service here to send a text message. | ||
return Task.FromResult(0); | ||
} | ||
} | ||
} |
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