mirror of
https://github.com/SoDOff-Project/sodoff.git
synced 2025-10-11 00:08:50 -07:00
changed AuthenticationInfo schema (used by MMO)
* send Viking.Id * use VikingName (instead of DisplayName) for Viking.Name
This commit is contained in:
parent
3877a8ba37
commit
4792315168
@ -237,7 +237,8 @@ public class AuthenticationController : Controller {
|
||||
var session = ctx.Sessions.FirstOrDefault(x => x.ApiToken == token);
|
||||
if (session != null) {
|
||||
info.Authenticated = true;
|
||||
info.DisplayName = session.Viking.Name;
|
||||
info.Id = session.Viking.Id;
|
||||
info.VikingName = session.Viking.Name;
|
||||
Role? role = session.Viking.MMORoles.FirstOrDefault()?.Role;
|
||||
if (role != null)
|
||||
info.Role = (Role)role;
|
||||
|
@ -7,7 +7,10 @@ public class AuthenticationInfo {
|
||||
public bool Authenticated { get; set; }
|
||||
|
||||
[XmlElement]
|
||||
public string DisplayName { get; set; } = string.Empty;
|
||||
public int Id { get; set; } = 0;
|
||||
|
||||
[XmlElement]
|
||||
public string VikingName { get; set; } = string.Empty;
|
||||
|
||||
[XmlElement]
|
||||
public Role Role { get; set; } = Role.User;
|
||||
|
Loading…
x
Reference in New Issue
Block a user