-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recreated API on Visual Studio 2017 and updated SDK to fix #2
- Loading branch information
Showing
58 changed files
with
286 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.28307.572 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JWTAPI", "JWTAPI\JWTAPI.csproj", "{9751E06C-4EB9-446E-9EA8-B3B5EC7DD7D8}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JWTAPI.Tests", "..\..\tests\JWTAPI.Tests\JWTAPI.Tests.csproj", "{A8EF1944-2D7F-445A-8ACA-2FEAAD7D2664}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{9751E06C-4EB9-446E-9EA8-B3B5EC7DD7D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{9751E06C-4EB9-446E-9EA8-B3B5EC7DD7D8}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{9751E06C-4EB9-446E-9EA8-B3B5EC7DD7D8}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{9751E06C-4EB9-446E-9EA8-B3B5EC7DD7D8}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{A8EF1944-2D7F-445A-8ACA-2FEAAD7D2664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A8EF1944-2D7F-445A-8ACA-2FEAAD7D2664}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A8EF1944-2D7F-445A-8ACA-2FEAAD7D2664}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A8EF1944-2D7F-445A-8ACA-2FEAAD7D2664}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {75D538DA-D647-4594-AEA5-49BC3B6899DE} | ||
EndGlobalSection | ||
EndGlobal |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="wwwroot\" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="AutoMapper" Version="8.0.0" /> | ||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore.App" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.8" /> | ||
<PackageReference Include="Microsoft.Extensions.Options" Version="2.1.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,38 @@ | ||
using JWTAPI.Core.Security.Hashing; | ||
using JWTAPI.Persistence; | ||
using Microsoft.AspNetCore; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace JWTAPI | ||
{ | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
var host = BuildWebHost(args); | ||
|
||
using(var scope = host.Services.CreateScope()) | ||
{ | ||
var services = scope.ServiceProvider; | ||
var context = services.GetService<AppDbContext>(); | ||
var passwordHasher = services.GetService<IPasswordHasher>(); | ||
DatabaseSeed.Seed(context, passwordHasher); | ||
} | ||
|
||
host.Run(); | ||
} | ||
|
||
public static IWebHost BuildWebHost(string[] args) => | ||
WebHost.CreateDefaultBuilder(args) | ||
.UseStartup<Startup>() | ||
.Build(); | ||
} | ||
using JWTAPI.Core.Security.Hashing; | ||
using JWTAPI.Persistence; | ||
using Microsoft.AspNetCore; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace JWTAPI | ||
{ | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
var host = BuildWebHost(args); | ||
|
||
using (var scope = host.Services.CreateScope()) | ||
{ | ||
var services = scope.ServiceProvider; | ||
var context = services.GetService<AppDbContext>(); | ||
var passwordHasher = services.GetService<IPasswordHasher>(); | ||
DatabaseSeed.Seed(context, passwordHasher); | ||
} | ||
|
||
host.Run(); | ||
} | ||
|
||
public static IWebHost BuildWebHost(string[] args) => | ||
/* | ||
* The call to ".UseIISIntegration" is necessary to fix issue while running the API from ISS. See the following links for reference: | ||
* - https://github.com/aspnet/IISIntegration/issues/242 | ||
* - https://stackoverflow.com/questions/50112665/newly-created-net-core-gives-http-400-using-windows-authentication | ||
*/ | ||
|
||
WebHost.CreateDefaultBuilder(args) | ||
.UseIISIntegration() | ||
.UseStartup<Startup>() | ||
.Build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:5000/", | ||
"sslPort": 0 | ||
} | ||
}, | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchUrl": "http://localhost:5000/", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"JWTAPI": { | ||
"commandName": "IISExpress", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
}, | ||
"applicationUrl": "http://localhost:5000" | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.