In this commit, I refined the private key download button to possess the following qualities:
Cookies
Encapsulation within backend (server.go)
Actually initiating a download instead of just opening up the file contents in the next page
Purpose of Cookies: allows user to disable post login popup by clicking the acknowledge button for 30 days. To test this, log into the dev ci and click the acknowledge button once the pop up loads. After this occurs, log out, and log back in. The popup should no longer appear for the next 30 days.
Purpose of Encapsulation: Improve readability of code. This code change was done purely for readability purposes so its effects can only be seen within the server.go file meaning there are no tests to be done.
Purpose of initiating download: To ensure that when the user wants to download the button, the download is actually initiated by the browser, and the downloaded file can actually be located within the users local directory upon completion. To test this change, After logging in, click on the "Download Private Key" button. The private key button should show up on the bottom left of your browser after doing so. You can verify that the file contents are correct by opening it up from your local directory.
In this commit, I refined the private key download button to possess the following qualities:
Purpose of Cookies: allows user to disable post login popup by clicking the acknowledge button for 30 days. To test this, log into the dev ci and click the acknowledge button once the pop up loads. After this occurs, log out, and log back in. The popup should no longer appear for the next 30 days.
Purpose of Encapsulation: Improve readability of code. This code change was done purely for readability purposes so its effects can only be seen within the server.go file meaning there are no tests to be done.
Purpose of initiating download: To ensure that when the user wants to download the button, the download is actually initiated by the browser, and the downloaded file can actually be located within the users local directory upon completion. To test this change, After logging in, click on the "Download Private Key" button. The private key button should show up on the bottom left of your browser after doing so. You can verify that the file contents are correct by opening it up from your local directory.