// GET: api/Organisation public Boolean GetPasswordCorrect(string oldPassword) { ClaimsPrincipal p = RequestContext.Principal as ClaimsPrincipal; //string dbDatabase = p.Claims.ElementAt(0).Value; string dbLogin = p.Claims.ElementAt(1).Value; string dbPassword = p.Claims.ElementAt(2).Value; Boolean passwordCorrect = OrganisationDA.checkOldPassword(dbLogin, dbPassword, oldPassword); return(passwordCorrect); }