260918_02_ENH: 인증 정보에 id와 팀 추가
This commit is contained in:
@@ -87,7 +87,7 @@ namespace KART_API.Controllers
|
|||||||
Security security = new Security();
|
Security security = new Security();
|
||||||
string token = security.GenerateToken(userID, userName, userTeam, isAdmin);
|
string token = security.GenerateToken(userID, userName, userTeam, isAdmin);
|
||||||
|
|
||||||
Authentication authentication = new Authentication(token, userName, isAdmin);
|
Authentication authentication = new Authentication(token, userID, userTeam, userName, isAdmin);
|
||||||
returnString = Common.GetJsonFromObject(authentication);
|
returnString = Common.GetJsonFromObject(authentication);
|
||||||
|
|
||||||
Response.StatusCode = (int)HttpStatusCode.OK;
|
Response.StatusCode = (int)HttpStatusCode.OK;
|
||||||
@@ -144,7 +144,7 @@ namespace KART_API.Controllers
|
|||||||
string tempID = externalParam.External + "_" + Common.GetRandomString();
|
string tempID = externalParam.External + "_" + Common.GetRandomString();
|
||||||
string token = security.GenerateToken(tempID, externalParam.External, externalParam.External, "9");
|
string token = security.GenerateToken(tempID, externalParam.External, externalParam.External, "9");
|
||||||
|
|
||||||
Authentication authentication = new Authentication(token, externalParam.External, "9");
|
Authentication authentication = new Authentication(token, tempID, externalParam.External, externalParam.External, "9");
|
||||||
returnString = Common.GetJsonFromObject(authentication);
|
returnString = Common.GetJsonFromObject(authentication);
|
||||||
|
|
||||||
Response.StatusCode = (int)HttpStatusCode.OK;
|
Response.StatusCode = (int)HttpStatusCode.OK;
|
||||||
|
|||||||
@@ -20,12 +20,16 @@ namespace KART_API.Dto
|
|||||||
public class Authentication
|
public class Authentication
|
||||||
{
|
{
|
||||||
public string Token { get; set; }
|
public string Token { get; set; }
|
||||||
public string Name { get; set; }
|
public string ID { get; set; }
|
||||||
public string IsAdmin { get; set; }
|
public string Name { get; set; }
|
||||||
public Authentication(string token, string name, string isAdmin)
|
public string Team { get; set; }
|
||||||
|
public string IsAdmin { get; set; }
|
||||||
|
public Authentication(string token, string id, string team, string name, string isAdmin)
|
||||||
{
|
{
|
||||||
Token = token;
|
Token = token;
|
||||||
Name = name;
|
ID = id;
|
||||||
|
Team = team;
|
||||||
|
Name = name;
|
||||||
IsAdmin = isAdmin;
|
IsAdmin = isAdmin;
|
||||||
}
|
}
|
||||||
public Authentication() { }
|
public Authentication() { }
|
||||||
|
|||||||
Reference in New Issue
Block a user