public admin VerifyAccessToken_back(JWTPayload payload) { try { test_db db = new test_db(); if (payload == null) { return(null); } if (payload.exp < DateTime.UtcNow) { return(null); } var res = db.admins.FirstOrDefault(e => e.ad_username.Equals(payload.username)); return(res); } catch { return(null); } }
public member VerifyAccessToken_main(JWTPayload payload) { try { test_db db = new test_db(); if (payload == null) { return(null); } if (payload.exp < DateTime.UtcNow) { return(null); } var res = db.members.FirstOrDefault(e => e.mem_usename.Equals(payload.username)); return(res); } catch { return(null); } }