rename to passphrase
This commit is contained in:
parent
89a8b1a28b
commit
bdb0fc4906
@ -17,13 +17,13 @@ namespace BinaryDad.Notes.Controllers
|
|||||||
[ActionName(nameof(Login))]
|
[ActionName(nameof(Login))]
|
||||||
[Route("login")]
|
[Route("login")]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IActionResult> LoginPost([Required] string passPhrase, string returnUrl)
|
public async Task<IActionResult> LoginPost([Required] string passphrase, string returnUrl)
|
||||||
{
|
{
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
var appPassPhrase = Environment.GetEnvironmentVariable("APP_PASS_PHRASE");
|
var appPassphrase = Environment.GetEnvironmentVariable("APP_PASSPHRASE");
|
||||||
|
|
||||||
if (passPhrase == appPassPhrase)
|
if (passphrase == appPassphrase)
|
||||||
{
|
{
|
||||||
var claims = new List<Claim>
|
var claims = new List<Claim>
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||||
"APP_PASS_PHRASE": "123456"
|
"APP_PASSPHRASE": "123456"
|
||||||
},
|
},
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"applicationUrl": "http://localhost:5015"
|
"applicationUrl": "http://localhost:5015"
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
@Html.ValidationSummary()
|
@Html.ValidationSummary()
|
||||||
|
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<input type="password" name="passPhrase" placeholder="Pass Phrase" />
|
<input type="password" name="passphrase" placeholder="Passphrase" />
|
||||||
</form>
|
</form>
|
Loading…
x
Reference in New Issue
Block a user