Implement UserData and TitleData

This commit is contained in:
AeonLucid
2021-11-03 21:29:54 +01:00
parent e5e3e7dff3
commit 667d19e9f2
12 changed files with 356 additions and 37 deletions
@@ -38,20 +38,21 @@ namespace Prospect.Server.Api.Services.Auth
return _tokenHandler.WriteToken(token);
}
public string Generate(PlayFabUser user)
public string GenerateUser(PlayFabEntity user)
{
return CreateToken(new[]
{
new Claim(AuthClaimTypes.Id, user.Id),
new Claim(AuthClaimTypes.UserId, user.UserId),
new Claim(AuthClaimTypes.EntityId, user.Id),
new Claim(AuthClaimTypes.Type, AuthType.User),
});
}
public string Generate(PlayFabEntity entity)
public string GenerateEntity(PlayFabEntity entity)
{
return CreateToken(new[]
{
new Claim(AuthClaimTypes.Id, entity.Id),
new Claim(AuthClaimTypes.EntityId, entity.Id),
new Claim(AuthClaimTypes.Type, AuthType.Entity),
});
}