Skip to content

Commit

Permalink
Merge pull request #2311 from dpaquette/feat/account_lockout
Browse files Browse the repository at this point in the history
Enabling account lock out
  • Loading branch information
MisterJames authored Mar 6, 2018
2 parents 1ddb59b + 5dda9c5 commit 9fe8737
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 36 deletions.
1 change: 1 addition & 0 deletions AllReadyApp/Web-App/AllReady/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
options.Password.RequireNonAlphanumeric = false;
options.Password.RequireDigit = true;
options.Password.RequireUppercase = false;
options.Lockout.MaxFailedAccessAttempts = Convert.ToInt32(Configuration["Authentication:MaxFailedAccessAttempts"]);
})
.AddEntityFrameworkStores<AllReadyContext>()
.AddDefaultTokenProviders();
Expand Down
16 changes: 8 additions & 8 deletions AllReadyApp/Web-App/AllReady/Views/Account/Lockout.cshtml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@{
ViewData["Title"] = "Locked out";
}

<hgroup>
<h1 class="text-danger">Locked out.</h1>
<h2 class="text-danger">This account has been locked out, please try again later.</h2>
</hgroup>
@{
ViewData["Title"] = "Locked out";
}

<hgroup>
<h1 class="text-danger">Locked out.</h1>
<p class="text-danger">This account has been locked out, please try again later or contact your organization administrator.</p>
</hgroup>
57 changes: 29 additions & 28 deletions AllReadyApp/Web-App/AllReady/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,35 +47,36 @@
"Email": {
"EmailFolder": "..."
},
"Authentication": {
"Facebook": {
"AppId": "[facebookappId]",
"AppSecret": "[facebookappsecret]"
"Authentication": {
"MaxFailedAccessAttempts": 5,
"Facebook": {
"AppId": "[facebookappId]",
"AppSecret": "[facebookappsecret]"
},
"Twitter": {
"ConsumerKey": "[twitterconsumerkey]",
"ConsumerSecret": "[twitterconsumersecret]"
},
"MicrosoftAccount": {
"ClientId": "[microsoftclientid]",
"ClientSecret": "[microsoftclientsecret]"
},
"Google": {
"ClientId": "[googleclientid]",
"ClientSecret": "[googleclientsecret]"
},
"SendGrid": {
"UserName": "[sendgriduser]",
"Password": "[sendgridpassword]",
"FromEmail": "[sendgridemailsender]"
},
"Twilio": {
"EnableTwilio": "false",
"Sid": "[twiliosid]",
"Token": "[twiliotoken]",
"PhoneNo": "[twilionumber]"
}
},
"Twitter": {
"ConsumerKey": "[twitterconsumerkey]",
"ConsumerSecret": "[twitterconsumersecret]"
},
"MicrosoftAccount": {
"ClientId": "[microsoftclientid]",
"ClientSecret": "[microsoftclientsecret]"
},
"Google": {
"ClientId": "[googleclientid]",
"ClientSecret": "[googleclientsecret]"
},
"SendGrid": {
"UserName": "[sendgriduser]",
"Password": "[sendgridpassword]",
"FromEmail": "[sendgridemailsender]"
},
"Twilio": {
"EnableTwilio": "false",
"Sid": "[twiliosid]",
"Token": "[twiliotoken]",
"PhoneNo": "[twilionumber]"
}
},
"ApprovedRegions": {
"Enabled": true,
"Regions": [
Expand Down

0 comments on commit 9fe8737

Please sign in to comment.