public async Task <object> loginusers([FromBody] UserAuthentication model) { object result = null; string message = string.Empty; vmLoggeduser loggeduser = null; try { if (model == null) { return(BadRequest()); } //Save _objusers = new AuthUsers(); loggeduser = await _objusers.loginusers(model); } catch (Exception ex) { ex.ToString(); } result = new { loggeduser }; return(result); }
public async Task <object> regusers([FromBody] User model) { object result = null; string message = string.Empty; try { if (model == null) { return(BadRequest()); } //Save _objusers = new AuthUsers(); message = await _objusers.regusers(model); } catch (Exception ex) { ex.ToString(); } result = new { message }; return(result); }
private SysUserModel MakeSysUser(AuthUsers rawuser, AuthRoles roles, List <AuthUserClaims> claimslist) { return(new SysUserModel { SubjectId = rawuser.Uid, Username = rawuser.Account, Password = rawuser.Password, Claims = { new Claim(JwtClaimTypes.Email, rawuser.Email), new Claim(JwtClaimTypes.GivenName, rawuser.DisplayName), new Claim(JwtClaimTypes.NickName, rawuser.Phone), new Claim(JwtClaimTypes.Locale, roles.Rolename), new Claim(JwtClaimTypes.ZoneInfo, roles.Roledescript), new Claim(JwtClaimTypes.Gender, roles.Id.ToString()), new Claim("mytestclaim", "mytestdata"), } }); }
public async Task TestAuth() { await AuthUsers.AuthUser("barotti"); }
public async Task TestAuth() { await AuthUsers.AuthUser("carta"); }
public async Task TestAuth() { await AuthUsers.AuthUser(MultipleUsers.Carta); }
public async Task TestAuth() { await AuthUsers.AuthUser(MultipleUsers.Azzurra); }
public async Task TestAuth() { await AuthUsers.AuthUser(MultipleUsers.Bello); }
public async Task TestAuth() { await AuthUsers.AuthUser("bello"); }
public async Task TestAuth() { await AuthUsers.AuthUser("aurelia"); }
public async Task TestAuth() { await AuthUsers.AuthUser("castelli"); }
public async Task TestAuth() { await AuthUsers.AuthUser("casagrande"); }
public async Task TestAuth() { await AuthUsers.AuthUser(MultipleUsers.Barotti); }
public async Task TestAuth() { await AuthUsers.AuthUser("camelot"); }
public async Task TestAuth() { await AuthUsers.AuthUser("barbiero"); }
public async Task TestAuth() { await AuthUsers.AuthUser("azzurra"); }
public async Task TestAuth() { await AuthUsers.AuthUser(MultipleUsers.Casagrande); }