This commit is contained in:
Paul Schneider 2017-02-01 03:53:00 +01:00
commit 03b6447d7c
9 changed files with 1755 additions and 1 deletions

View file

@ -18,6 +18,9 @@ using OAuth.AspNet.Tokens;
using Yavsc.Auth;
using Yavsc.Extensions;
using Yavsc.Models;
using Microsoft.Extensions.Logging;
using System.Linq;
using Newtonsoft.Json;
namespace Yavsc
{
@ -142,6 +145,12 @@ namespace Yavsc
var service =
serviceScope.ServiceProvider.GetService<ApplicationDbContext>();
await service.StoreTokenAsync(gcontext.GoogleUserId, context.TokenResponse);
// var user = service.Users.First(u=>u.Id == gcontext.Principal.GetUserId());
// logger.LogWarning(user.UserName);
// logger.LogWarning(context.User.ToString());
logger.LogWarning(
string.Join(" ",
gcontext.Identity.Claims.Select(c=>c.Value).ToArray()));
}
}
}