public AuthTokenResponseType GetAuthToken(string userName, string password) { string validUser = "******"; string validPassword = "******"; string validToken = "QwCcA13Ux47ZdwpyX8j"; AuthTokenResponseType resp = new AuthTokenResponseType(); if (userName == validUser && password == validPassword) { resp.Token = validToken; resp.IsValid = true; resp.Expires = DateTime.Now.Date.AddDays(10).ToString("yyyy-mm-dd"); resp.Message = "the user is valid"; } else { resp.IsValid = false; resp.Token = null; resp.Expires = null; resp.Message = "Invalid userName or password"; } return(resp); }
public AuthTokenResponseType GetAuthToken(string userName, string password) { string validUser = "******"; string validPassword = "******"; string validToken = "QwCcA13Ux47ZdwpyX8j"; AuthTokenResponseType resp = new AuthTokenResponseType(); if (userName == validUser && password == validPassword) { resp.Token = validToken; resp.IsValid = true; resp.Expires = DateTime.Now.Date.AddDays(10).ToString("yyyy-mm-dd"); resp.Message = "the user is valid"; } else { resp.IsValid = false; resp.Token = null; resp.Expires = null; resp.Message = "Invalid userName or password"; } return resp; }