diff options
| author | Michael <[email protected]> | 2017-04-30 17:55:21 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-04-30 17:55:21 -0400 |
| commit | a8cda15372949545826f934fb597536244553e18 (patch) | |
| tree | bd608db7ddffb461583f0a3d487a85382339bf06 /Project-Unite/Controllers/OAuth2Controller.cs | |
| parent | acfdbc859254e4471ae55f44022de5ec98603577 (diff) | |
| download | project-unite-a8cda15372949545826f934fb597536244553e18.tar.gz project-unite-a8cda15372949545826f934fb597536244553e18.tar.bz2 project-unite-a8cda15372949545826f934fb597536244553e18.zip | |
add oauth errors to audit logs
Diffstat (limited to 'Project-Unite/Controllers/OAuth2Controller.cs')
| -rw-r--r-- | Project-Unite/Controllers/OAuth2Controller.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Project-Unite/Controllers/OAuth2Controller.cs b/Project-Unite/Controllers/OAuth2Controller.cs index e8641ae..aadadfd 100644 --- a/Project-Unite/Controllers/OAuth2Controller.cs +++ b/Project-Unite/Controllers/OAuth2Controller.cs @@ -86,8 +86,11 @@ namespace Project_Unite.Controllers return new HttpStatusCodeResult(403); } } - catch + catch(Exception ex) { + var db = new ApplicationDbContext(); + db.AuditLogs.Add(new Models.AuditLog("system", AuditLogLevel.Admin, "<b>The following error occurred during an OAuth2 authentication.</b><br/>" + ex.ToString())); + db.SaveChanges(); return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } |
