Fixes the Google login

vnext
Paul Schneider 4 years ago
parent cc6a6b8425
commit b4fbe13843
7 changed files with 18 additions and 20 deletions

@ -6,6 +6,7 @@ Ceci est une grosse liste de fonctionnalités, existantes, ou à implémenter, o
## Jalon 1 ## Jalon 1
☐ Redirection vers la Page d'accueil à la validation du second facteur (evitera l'erreur Anti-forgery token)
☐ Des spécifications détaillées du coeur de l'application ☐ Des spécifications détaillées du coeur de l'application
✔ Acces (publique) aux Blogs. @done (August 13th 2016, 0:51) ✔ Acces (publique) aux Blogs. @done (August 13th 2016, 0:51)
✔ Accès aux profiles des intervenants. @done (August 13th 2016, 0:57) ✔ Accès aux profiles des intervenants. @done (August 13th 2016, 0:57)

@ -10,6 +10,9 @@
"enablePackageRestore": false, "enablePackageRestore": false,
"projects": "src/*/project.json;*/project.json;project.json;test/*/project.json" "projects": "src/*/project.json;*/project.json;project.json;test/*/project.json"
}, },
"Script": {
"enabled": false
},
"fileOptions": { "fileOptions": {
"systemExcludeSearchPatterns": [ "systemExcludeSearchPatterns": [
"**/bin/**/*", "**/bin/**/*",

@ -1,14 +0,0 @@
#! "dnx451"
#r "nuget:Microsoft.Azure.WebJobs,*"
using System;
public static void Run(string myEventHubMessage)
{
// log.Info($"C# Event Hub trigger function processed a message: {myEventHubMessage}");
Console.WriteLine("Test");
}
Run("test");

@ -60,7 +60,7 @@
"Microsoft.Extensions.Logging.TraceSource": "1.0.0-rc1-final", "Microsoft.Extensions.Logging.TraceSource": "1.0.0-rc1-final",
"Microsoft.Extensions.Options": "0.0.1-alpha", "Microsoft.Extensions.Options": "0.0.1-alpha",
"Microsoft.Extensions.Localization": "1.0.0-rc1-final", "Microsoft.Extensions.Localization": "1.0.0-rc1-final",
"Newtonsoft.Json": "6.0.1-beta1", "Newtonsoft.Json": "7.0.1",
"Gapi.net45": "1.0.1", "Gapi.net45": "1.0.1",
"PayPalMerchant-net451": "2.7.109", "PayPalMerchant-net451": "2.7.109",
"MailKit": "1.12.0", "MailKit": "1.12.0",

@ -94,6 +94,7 @@ namespace Yavsc.Controllers
// user.EmailConfirmed // user.EmailConfirmed
return View(toShow.ToArray()); return View(toShow.ToArray());
} }
string GeneratePageToken() { string GeneratePageToken() {
return System.Guid.NewGuid().ToString(); return System.Guid.NewGuid().ToString();
} }
@ -152,7 +153,11 @@ namespace Yavsc.Controllers
return this.ViewOk(model); return this.ViewOk(model);
} }
} }
else {
ModelState.AddModelError(string.Empty,
"No such user.");
return this.ViewOk(model);
}
// This doesn't count login failures towards account lockout // This doesn't count login failures towards account lockout
// To enable password failures to trigger account lockout, set lockoutOnFailure: true // To enable password failures to trigger account lockout, set lockoutOnFailure: true
var result = await _signInManager.PasswordSignInAsync(model.UserName, model.Password, model.RememberMe, lockoutOnFailure: false); var result = await _signInManager.PasswordSignInAsync(model.UserName, model.Password, model.RememberMe, lockoutOnFailure: false);

@ -24,11 +24,13 @@ namespace Yavsc.Controllers
public ProjectController(ApplicationDbContext context, public ProjectController(ApplicationDbContext context,
ILoggerFactory loggerFactory, ILoggerFactory loggerFactory,
IStringLocalizer<Yavsc.YavscLocalisation> localizer IStringLocalizer<Yavsc.YavscLocalisation> localizer,
IStringLocalizer<BugController> bugLocalizer
) )
{ {
_context = context; _context = context;
_localizer = localizer; _localizer = localizer;
_bugLocalizer = bugLocalizer;
_logger = loggerFactory.CreateLogger<ProjectController>(); _logger = loggerFactory.CreateLogger<ProjectController>();
} }
@ -36,6 +38,7 @@ namespace Yavsc.Controllers
// GET: Project // GET: Project
public async Task<IActionResult> Index() public async Task<IActionResult> Index()
{ {
var applicationDbContext = _context.Project.Include(p => p.Client).Include(p => p.Context).Include(p => p.PerformerProfile).Include(p => p.Regularisation).Include(p => p.Repository); var applicationDbContext = _context.Project.Include(p => p.Client).Include(p => p.Context).Include(p => p.PerformerProfile).Include(p => p.Regularisation).Include(p => p.Repository);
return View(await applicationDbContext.ToListAsync()); return View(await applicationDbContext.ToListAsync());
} }

Loading…