Notify and crash before its a problem
Docker Build and Release Upload / build (push) Successful in 1m25s
Docker Build and Release Upload / build (push) Successful in 1m25s
This commit is contained in:
@@ -52,7 +52,7 @@ namespace Auth.Controllers {
|
|||||||
return BadRequest("Account Not Found");
|
return BadRequest("Account Not Found");
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Console.WriteLine("Login Error: " + ex.Message);
|
Console.WriteLine("Login Error: " + ex.Message);
|
||||||
return BadRequest("An internal server error has occured: " + ex.Message);
|
return BadRequest("An internal server error has occured");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ namespace Auth.Controllers {
|
|||||||
}
|
}
|
||||||
return BadRequest("The session ticket cannot be found");
|
return BadRequest("The session ticket cannot be found");
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Console.WriteLine("Delete Error: " + ex.Message);
|
Console.WriteLine("Token Error: " + ex.Message);
|
||||||
return BadRequest("An internal server error has occured");
|
return BadRequest("An internal server error has occured");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,11 @@ namespace Auth.Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static RsaSecurityKey LoadRSAKey(string KeyPath) {
|
public static RsaSecurityKey LoadRSAKey(string KeyPath) {
|
||||||
|
if (!File.Exists(KeyPath)) {
|
||||||
|
Console.WriteLine("Unable to load certificate from path: " + KeyPath);
|
||||||
|
Console.WriteLine("---- Shutting down ----");
|
||||||
|
Environment.Exit(100);
|
||||||
|
}
|
||||||
string KeyText = File.ReadAllText(KeyPath);
|
string KeyText = File.ReadAllText(KeyPath);
|
||||||
RSA rsa = RSA.Create();
|
RSA rsa = RSA.Create();
|
||||||
rsa.ImportFromPem(KeyText.ToCharArray());
|
rsa.ImportFromPem(KeyText.ToCharArray());
|
||||||
|
|||||||
Reference in New Issue
Block a user