Skip to content

Commit

Permalink
Added token based authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
baristutakli committed Jan 30, 2022
1 parent c4598f2 commit 0cf8f1b
Show file tree
Hide file tree
Showing 68 changed files with 1,331 additions and 70 deletions.
Binary file modified .vs/BookStoreSln/v16/.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion Tests/WebApi.UnitTests/TestSetup/CommonTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public CommonTestFixture()
Context =new BookStoreDbContext(options);
Context.Database.EnsureCreated();
Context.AddBooks();
Context.AddGenres();


Mapper = new MapperConfiguration(cfg=>{cfg.AddProfile<MappingProfile>();}).CreateMapper();
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
155 changes: 135 additions & 20 deletions Tests/WebApi.UnitTests/bin/Debug/net5.0/WebApi.UnitTests.deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@
}
}
},
"Microsoft.AspNetCore.Authentication.JwtBearer/5.0.13": {
"dependencies": {
"Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.7.1"
},
"runtime": {
"lib/net5.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll": {
"assemblyVersion": "5.0.13.0",
"fileVersion": "5.0.1321.57202"
}
}
},
"Microsoft.CodeCoverage/16.9.4": {
"runtime": {
"lib/netcoreapp1.0/Microsoft.VisualStudio.CodeCoverage.Shim.dll": {
Expand Down Expand Up @@ -175,6 +186,62 @@
}
},
"Microsoft.Extensions.Primitives/5.0.0": {},
"Microsoft.IdentityModel.JsonWebTokens/6.7.1": {
"dependencies": {
"Microsoft.IdentityModel.Tokens": "6.7.1"
},
"runtime": {
"lib/netstandard2.0/Microsoft.IdentityModel.JsonWebTokens.dll": {
"assemblyVersion": "6.7.1.0",
"fileVersion": "6.7.1.10630"
}
}
},
"Microsoft.IdentityModel.Logging/6.7.1": {
"runtime": {
"lib/netstandard2.0/Microsoft.IdentityModel.Logging.dll": {
"assemblyVersion": "6.7.1.0",
"fileVersion": "6.7.1.10630"
}
}
},
"Microsoft.IdentityModel.Protocols/6.7.1": {
"dependencies": {
"Microsoft.IdentityModel.Logging": "6.7.1",
"Microsoft.IdentityModel.Tokens": "6.7.1"
},
"runtime": {
"lib/netstandard2.0/Microsoft.IdentityModel.Protocols.dll": {
"assemblyVersion": "6.7.1.0",
"fileVersion": "6.7.1.10630"
}
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect/6.7.1": {
"dependencies": {
"Microsoft.IdentityModel.Protocols": "6.7.1",
"System.IdentityModel.Tokens.Jwt": "6.7.1"
},
"runtime": {
"lib/netstandard2.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll": {
"assemblyVersion": "6.7.1.0",
"fileVersion": "6.7.1.10630"
}
}
},
"Microsoft.IdentityModel.Tokens/6.7.1": {
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"Microsoft.IdentityModel.Logging": "6.7.1",
"System.Security.Cryptography.Cng": "4.5.0"
},
"runtime": {
"lib/netstandard2.0/Microsoft.IdentityModel.Tokens.dll": {
"assemblyVersion": "6.7.1.0",
"fileVersion": "6.7.1.10630"
}
}
},
"Microsoft.NET.Test.Sdk/16.9.4": {
"dependencies": {
"Microsoft.CodeCoverage": "16.9.4",
Expand Down Expand Up @@ -801,6 +868,18 @@
"System.Runtime.InteropServices": "4.3.0"
}
},
"System.IdentityModel.Tokens.Jwt/6.7.1": {
"dependencies": {
"Microsoft.IdentityModel.JsonWebTokens": "6.7.1",
"Microsoft.IdentityModel.Tokens": "6.7.1"
},
"runtime": {
"lib/netstandard2.0/System.IdentityModel.Tokens.Jwt.dll": {
"assemblyVersion": "6.7.1.0",
"fileVersion": "6.7.1.10630"
}
}
},
"System.IO/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
Expand Down Expand Up @@ -1069,21 +1148,7 @@
"runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0"
}
},
"System.Security.Cryptography.Cng/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"System.IO": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Runtime.Handles": "4.3.0",
"System.Runtime.InteropServices": "4.3.0",
"System.Security.Cryptography.Algorithms": "4.3.0",
"System.Security.Cryptography.Encoding": "4.3.0",
"System.Security.Cryptography.Primitives": "4.3.0",
"System.Text.Encoding": "4.3.0"
}
},
"System.Security.Cryptography.Cng/4.5.0": {},
"System.Security.Cryptography.Csp/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
Expand Down Expand Up @@ -1178,7 +1243,7 @@
"System.Runtime.InteropServices": "4.3.0",
"System.Runtime.Numerics": "4.3.0",
"System.Security.Cryptography.Algorithms": "4.3.0",
"System.Security.Cryptography.Cng": "4.3.0",
"System.Security.Cryptography.Cng": "4.5.0",
"System.Security.Cryptography.Csp": "4.3.0",
"System.Security.Cryptography.Encoding": "4.3.0",
"System.Security.Cryptography.OpenSsl": "4.3.0",
Expand Down Expand Up @@ -1343,6 +1408,7 @@
"AutoMapper": "10.1.1",
"AutoMapper.Extensions.Microsoft.DependencyInjection": "8.1.1",
"FluentValidation": "10.3.6",
"Microsoft.AspNetCore.Authentication.JwtBearer": "5.0.13",
"Microsoft.EntityFrameworkCore": "5.0.6",
"Microsoft.EntityFrameworkCore.InMemory": "5.0.6",
"Newtonsoft.Json": "13.0.1",
Expand Down Expand Up @@ -1402,6 +1468,13 @@
"path": "fluentvalidation/10.3.6",
"hashPath": "fluentvalidation.10.3.6.nupkg.sha512"
},
"Microsoft.AspNetCore.Authentication.JwtBearer/5.0.13": {
"type": "package",
"serviceable": true,
"sha512": "sha512-1A7zBeKjmD/6trvVcvgoYDrTNk3LwmlLwrd6tnSDS6ePyjE1Nbu7NjqC7cisUAzQGMd7xp0aXKIrJ8YW6iHisQ==",
"path": "microsoft.aspnetcore.authentication.jwtbearer/5.0.13",
"hashPath": "microsoft.aspnetcore.authentication.jwtbearer.5.0.13.nupkg.sha512"
},
"Microsoft.CodeCoverage/16.9.4": {
"type": "package",
"serviceable": true,
Expand Down Expand Up @@ -1507,6 +1580,41 @@
"path": "microsoft.extensions.primitives/5.0.0",
"hashPath": "microsoft.extensions.primitives.5.0.0.nupkg.sha512"
},
"Microsoft.IdentityModel.JsonWebTokens/6.7.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-q/Ii8ILV8cM1X49gnl12cJK+0KWiI1xUeiLYiE9+uRonJLaHWB0l8t89rGnZTEGthGKItyikKSB38LQpfy/zBw==",
"path": "microsoft.identitymodel.jsonwebtokens/6.7.1",
"hashPath": "microsoft.identitymodel.jsonwebtokens.6.7.1.nupkg.sha512"
},
"Microsoft.IdentityModel.Logging/6.7.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-WGtTiTy2ZikOz/I5GxCGbNPLOpyI9fPyuyG4Q5rfkhACK+Q0Ad6U8XajYZ2cJ2cFKse0IvHwm15HVrfwrX/89g==",
"path": "microsoft.identitymodel.logging/6.7.1",
"hashPath": "microsoft.identitymodel.logging.6.7.1.nupkg.sha512"
},
"Microsoft.IdentityModel.Protocols/6.7.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-DVGYIRUK3TkCTmz0IgBzWUE55CDNfLtXil1FgSbgHI7hi2fP2pz4tiTAno/5O/hdVwAzV+HtCQtFi7xW8smaHw==",
"path": "microsoft.identitymodel.protocols/6.7.1",
"hashPath": "microsoft.identitymodel.protocols.6.7.1.nupkg.sha512"
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect/6.7.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-99gA+E6ZOCqySrT80Yh6wrfjJfeMxDisdAcA5Q66zHxMPY5Gzc8aT2Ldzu0GP1sADv/o3yI1Gc3P1GHXlXAVVQ==",
"path": "microsoft.identitymodel.protocols.openidconnect/6.7.1",
"hashPath": "microsoft.identitymodel.protocols.openidconnect.6.7.1.nupkg.sha512"
},
"Microsoft.IdentityModel.Tokens/6.7.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Td9Vn9d/0eM1zlUUvaVQzjqdBkBLJ2oGtGL/LYPuiCUAALMeAHVDtpXGk8eYI8Gbduz5n+o7ifldsCIca4MWew==",
"path": "microsoft.identitymodel.tokens/6.7.1",
"hashPath": "microsoft.identitymodel.tokens.6.7.1.nupkg.sha512"
},
"Microsoft.NET.Test.Sdk/16.9.4": {
"type": "package",
"serviceable": true,
Expand Down Expand Up @@ -1878,6 +1986,13 @@
"path": "system.globalization.extensions/4.3.0",
"hashPath": "system.globalization.extensions.4.3.0.nupkg.sha512"
},
"System.IdentityModel.Tokens.Jwt/6.7.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-sPnRn9dUMYARQC3mAKWpig/7rlrruqJvopKXmGoYAQ1A+xQsT3q5LiwsArkV8Oz/hfiRCLkV9vgi3FQg/mYfrw==",
"path": "system.identitymodel.tokens.jwt/6.7.1",
"hashPath": "system.identitymodel.tokens.jwt.6.7.1.nupkg.sha512"
},
"System.IO/4.3.0": {
"type": "package",
"serviceable": true,
Expand Down Expand Up @@ -2067,12 +2182,12 @@
"path": "system.security.cryptography.algorithms/4.3.0",
"hashPath": "system.security.cryptography.algorithms.4.3.0.nupkg.sha512"
},
"System.Security.Cryptography.Cng/4.3.0": {
"System.Security.Cryptography.Cng/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==",
"path": "system.security.cryptography.cng/4.3.0",
"hashPath": "system.security.cryptography.cng.4.3.0.nupkg.sha512"
"sha512": "sha512-WG3r7EyjUe9CMPFSs6bty5doUqT+q9pbI80hlNzo2SkPkZ4VTuZkGWjpp77JB8+uaL4DFPRdBsAY+DX3dBK92A==",
"path": "system.security.cryptography.cng/4.5.0",
"hashPath": "system.security.cryptography.cng.4.5.0.nupkg.sha512"
},
"System.Security.Cryptography.Csp/4.3.0": {
"type": "package",
Expand Down
Binary file modified Tests/WebApi.UnitTests/bin/Debug/net5.0/WebApi.UnitTests.dll
Binary file not shown.
Binary file modified Tests/WebApi.UnitTests/bin/Debug/net5.0/WebApi.UnitTests.pdb
Binary file not shown.
Loading

0 comments on commit 0cf8f1b

Please sign in to comment.