Added basic auth checking code. First bit of code to protect an API call in the Employee controller.

This commit is contained in:
2021-01-03 18:44:08 -06:00
parent 26ea8e8cbc
commit ddb42da7bb
15 changed files with 670 additions and 15 deletions
+448 -1
View File
@@ -22,6 +22,135 @@
"runtime": {
"lib/netstandard2.0/Microsoft.AspNetCore.Cryptography.KeyDerivation.dll": {}
}
},
"Microsoft.NETCore.Platforms/3.1.0": {
"type": "package",
"compile": {
"lib/netstandard1.0/_._": {}
},
"runtime": {
"lib/netstandard1.0/_._": {}
}
},
"Microsoft.Win32.Registry/4.7.0": {
"type": "package",
"dependencies": {
"System.Security.AccessControl": "4.7.0",
"System.Security.Principal.Windows": "4.7.0"
},
"compile": {
"ref/netstandard2.0/_._": {}
},
"runtime": {
"lib/netstandard2.0/Microsoft.Win32.Registry.dll": {}
},
"runtimeTargets": {
"runtimes/unix/lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
"assetType": "runtime",
"rid": "unix"
},
"runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
"assetType": "runtime",
"rid": "win"
}
}
},
"runtime.native.System.Data.SqlClient.sni/4.7.0": {
"type": "package",
"dependencies": {
"runtime.win-arm64.runtime.native.System.Data.SqlClient.sni": "4.4.0",
"runtime.win-x64.runtime.native.System.Data.SqlClient.sni": "4.4.0",
"runtime.win-x86.runtime.native.System.Data.SqlClient.sni": "4.4.0"
}
},
"runtime.win-arm64.runtime.native.System.Data.SqlClient.sni/4.4.0": {
"type": "package",
"runtimeTargets": {
"runtimes/win-arm64/native/sni.dll": {
"assetType": "native",
"rid": "win-arm64"
}
}
},
"runtime.win-x64.runtime.native.System.Data.SqlClient.sni/4.4.0": {
"type": "package",
"runtimeTargets": {
"runtimes/win-x64/native/sni.dll": {
"assetType": "native",
"rid": "win-x64"
}
}
},
"runtime.win-x86.runtime.native.System.Data.SqlClient.sni/4.4.0": {
"type": "package",
"runtimeTargets": {
"runtimes/win-x86/native/sni.dll": {
"assetType": "native",
"rid": "win-x86"
}
}
},
"System.Data.SqlClient/4.8.2": {
"type": "package",
"dependencies": {
"Microsoft.Win32.Registry": "4.7.0",
"System.Security.Principal.Windows": "4.7.0",
"runtime.native.System.Data.SqlClient.sni": "4.7.0"
},
"compile": {
"ref/netcoreapp2.1/System.Data.SqlClient.dll": {}
},
"runtime": {
"lib/netcoreapp2.1/System.Data.SqlClient.dll": {}
},
"runtimeTargets": {
"runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": {
"assetType": "runtime",
"rid": "unix"
},
"runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll": {
"assetType": "runtime",
"rid": "win"
}
}
},
"System.Security.AccessControl/4.7.0": {
"type": "package",
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"System.Security.Principal.Windows": "4.7.0"
},
"compile": {
"ref/netstandard2.0/_._": {}
},
"runtime": {
"lib/netstandard2.0/System.Security.AccessControl.dll": {}
},
"runtimeTargets": {
"runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll": {
"assetType": "runtime",
"rid": "win"
}
}
},
"System.Security.Principal.Windows/4.7.0": {
"type": "package",
"compile": {
"ref/netcoreapp3.0/_._": {}
},
"runtime": {
"lib/netstandard2.0/System.Security.Principal.Windows.dll": {}
},
"runtimeTargets": {
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
"assetType": "runtime",
"rid": "unix"
},
"runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
"assetType": "runtime",
"rid": "win"
}
}
}
}
},
@@ -63,11 +192,325 @@
"microsoft.aspnetcore.cryptography.keyderivation.5.0.1.nupkg.sha512",
"microsoft.aspnetcore.cryptography.keyderivation.nuspec"
]
},
"Microsoft.NETCore.Platforms/3.1.0": {
"sha512": "z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==",
"type": "package",
"path": "microsoft.netcore.platforms/3.1.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"LICENSE.TXT",
"THIRD-PARTY-NOTICES.TXT",
"lib/netstandard1.0/_._",
"microsoft.netcore.platforms.3.1.0.nupkg.sha512",
"microsoft.netcore.platforms.nuspec",
"runtime.json",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"Microsoft.Win32.Registry/4.7.0": {
"sha512": "KSrRMb5vNi0CWSGG1++id2ZOs/1QhRqROt+qgbEAdQuGjGrFcl4AOl4/exGPUYz2wUnU42nvJqon1T3U0kPXLA==",
"type": "package",
"path": "microsoft.win32.registry/4.7.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"LICENSE.TXT",
"THIRD-PARTY-NOTICES.TXT",
"lib/net46/Microsoft.Win32.Registry.dll",
"lib/net461/Microsoft.Win32.Registry.dll",
"lib/net461/Microsoft.Win32.Registry.xml",
"lib/netstandard1.3/Microsoft.Win32.Registry.dll",
"lib/netstandard2.0/Microsoft.Win32.Registry.dll",
"lib/netstandard2.0/Microsoft.Win32.Registry.xml",
"microsoft.win32.registry.4.7.0.nupkg.sha512",
"microsoft.win32.registry.nuspec",
"ref/net46/Microsoft.Win32.Registry.dll",
"ref/net461/Microsoft.Win32.Registry.dll",
"ref/net461/Microsoft.Win32.Registry.xml",
"ref/net472/Microsoft.Win32.Registry.dll",
"ref/net472/Microsoft.Win32.Registry.xml",
"ref/netstandard1.3/Microsoft.Win32.Registry.dll",
"ref/netstandard1.3/Microsoft.Win32.Registry.xml",
"ref/netstandard1.3/de/Microsoft.Win32.Registry.xml",
"ref/netstandard1.3/es/Microsoft.Win32.Registry.xml",
"ref/netstandard1.3/fr/Microsoft.Win32.Registry.xml",
"ref/netstandard1.3/it/Microsoft.Win32.Registry.xml",
"ref/netstandard1.3/ja/Microsoft.Win32.Registry.xml",
"ref/netstandard1.3/ko/Microsoft.Win32.Registry.xml",
"ref/netstandard1.3/ru/Microsoft.Win32.Registry.xml",
"ref/netstandard1.3/zh-hans/Microsoft.Win32.Registry.xml",
"ref/netstandard1.3/zh-hant/Microsoft.Win32.Registry.xml",
"ref/netstandard2.0/Microsoft.Win32.Registry.dll",
"ref/netstandard2.0/Microsoft.Win32.Registry.xml",
"runtimes/unix/lib/netstandard2.0/Microsoft.Win32.Registry.dll",
"runtimes/unix/lib/netstandard2.0/Microsoft.Win32.Registry.xml",
"runtimes/win/lib/net46/Microsoft.Win32.Registry.dll",
"runtimes/win/lib/net461/Microsoft.Win32.Registry.dll",
"runtimes/win/lib/net461/Microsoft.Win32.Registry.xml",
"runtimes/win/lib/netstandard1.3/Microsoft.Win32.Registry.dll",
"runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll",
"runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.xml",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"runtime.native.System.Data.SqlClient.sni/4.7.0": {
"sha512": "9kyFSIdN3T0qjDQ2R0HRXYIhS3l5psBzQi6qqhdLz+SzFyEy4sVxNOke+yyYv8Cu8rPER12c3RDjLT8wF3WBYQ==",
"type": "package",
"path": "runtime.native.system.data.sqlclient.sni/4.7.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"LICENSE.TXT",
"THIRD-PARTY-NOTICES.TXT",
"runtime.native.system.data.sqlclient.sni.4.7.0.nupkg.sha512",
"runtime.native.system.data.sqlclient.sni.nuspec",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"runtime.win-arm64.runtime.native.System.Data.SqlClient.sni/4.4.0": {
"sha512": "LbrynESTp3bm5O/+jGL8v0Qg5SJlTV08lpIpFesXjF6uGNMWqFnUQbYBJwZTeua6E/Y7FIM1C54Ey1btLWupdg==",
"type": "package",
"path": "runtime.win-arm64.runtime.native.system.data.sqlclient.sni/4.4.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"runtime.win-arm64.runtime.native.system.data.sqlclient.sni.4.4.0.nupkg.sha512",
"runtime.win-arm64.runtime.native.system.data.sqlclient.sni.nuspec",
"runtimes/win-arm64/native/sni.dll",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"runtime.win-x64.runtime.native.System.Data.SqlClient.sni/4.4.0": {
"sha512": "38ugOfkYJqJoX9g6EYRlZB5U2ZJH51UP8ptxZgdpS07FgOEToV+lS11ouNK2PM12Pr6X/PpT5jK82G3DwH/SxQ==",
"type": "package",
"path": "runtime.win-x64.runtime.native.system.data.sqlclient.sni/4.4.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"runtime.win-x64.runtime.native.system.data.sqlclient.sni.4.4.0.nupkg.sha512",
"runtime.win-x64.runtime.native.system.data.sqlclient.sni.nuspec",
"runtimes/win-x64/native/sni.dll",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"runtime.win-x86.runtime.native.System.Data.SqlClient.sni/4.4.0": {
"sha512": "YhEdSQUsTx+C8m8Bw7ar5/VesXvCFMItyZF7G1AUY+OM0VPZUOeAVpJ4Wl6fydBGUYZxojTDR3I6Bj/+BPkJNA==",
"type": "package",
"path": "runtime.win-x86.runtime.native.system.data.sqlclient.sni/4.4.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"runtime.win-x86.runtime.native.system.data.sqlclient.sni.4.4.0.nupkg.sha512",
"runtime.win-x86.runtime.native.system.data.sqlclient.sni.nuspec",
"runtimes/win-x86/native/sni.dll",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"System.Data.SqlClient/4.8.2": {
"sha512": "80vGtW6uLB4AkyrdVuKTXYUyuXDPAsSKbTVfvjndZaRAYxzFzWhJbvUfeAKrN+128ycWZjLIAl61dFUwWHOOTw==",
"type": "package",
"path": "system.data.sqlclient/4.8.2",
"files": [
".nupkg.metadata",
".signature.p7s",
"Icon.png",
"LICENSE.TXT",
"THIRD-PARTY-NOTICES.TXT",
"lib/MonoAndroid10/_._",
"lib/MonoTouch10/_._",
"lib/net451/System.Data.SqlClient.dll",
"lib/net46/System.Data.SqlClient.dll",
"lib/net461/System.Data.SqlClient.dll",
"lib/net461/System.Data.SqlClient.xml",
"lib/netcoreapp2.1/System.Data.SqlClient.dll",
"lib/netcoreapp2.1/System.Data.SqlClient.xml",
"lib/netstandard1.2/System.Data.SqlClient.dll",
"lib/netstandard1.2/System.Data.SqlClient.xml",
"lib/netstandard1.3/System.Data.SqlClient.dll",
"lib/netstandard1.3/System.Data.SqlClient.xml",
"lib/netstandard2.0/System.Data.SqlClient.dll",
"lib/netstandard2.0/System.Data.SqlClient.xml",
"lib/xamarinios10/_._",
"lib/xamarinmac20/_._",
"lib/xamarintvos10/_._",
"lib/xamarinwatchos10/_._",
"ref/MonoAndroid10/_._",
"ref/MonoTouch10/_._",
"ref/net451/System.Data.SqlClient.dll",
"ref/net46/System.Data.SqlClient.dll",
"ref/net461/System.Data.SqlClient.dll",
"ref/net461/System.Data.SqlClient.xml",
"ref/netcoreapp2.1/System.Data.SqlClient.dll",
"ref/netcoreapp2.1/System.Data.SqlClient.xml",
"ref/netstandard1.2/System.Data.SqlClient.dll",
"ref/netstandard1.2/System.Data.SqlClient.xml",
"ref/netstandard1.2/de/System.Data.SqlClient.xml",
"ref/netstandard1.2/es/System.Data.SqlClient.xml",
"ref/netstandard1.2/fr/System.Data.SqlClient.xml",
"ref/netstandard1.2/it/System.Data.SqlClient.xml",
"ref/netstandard1.2/ja/System.Data.SqlClient.xml",
"ref/netstandard1.2/ko/System.Data.SqlClient.xml",
"ref/netstandard1.2/ru/System.Data.SqlClient.xml",
"ref/netstandard1.2/zh-hans/System.Data.SqlClient.xml",
"ref/netstandard1.2/zh-hant/System.Data.SqlClient.xml",
"ref/netstandard1.3/System.Data.SqlClient.dll",
"ref/netstandard1.3/System.Data.SqlClient.xml",
"ref/netstandard1.3/de/System.Data.SqlClient.xml",
"ref/netstandard1.3/es/System.Data.SqlClient.xml",
"ref/netstandard1.3/fr/System.Data.SqlClient.xml",
"ref/netstandard1.3/it/System.Data.SqlClient.xml",
"ref/netstandard1.3/ja/System.Data.SqlClient.xml",
"ref/netstandard1.3/ko/System.Data.SqlClient.xml",
"ref/netstandard1.3/ru/System.Data.SqlClient.xml",
"ref/netstandard1.3/zh-hans/System.Data.SqlClient.xml",
"ref/netstandard1.3/zh-hant/System.Data.SqlClient.xml",
"ref/netstandard2.0/System.Data.SqlClient.dll",
"ref/netstandard2.0/System.Data.SqlClient.xml",
"ref/xamarinios10/_._",
"ref/xamarinmac20/_._",
"ref/xamarintvos10/_._",
"ref/xamarinwatchos10/_._",
"runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll",
"runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.xml",
"runtimes/unix/lib/netstandard1.3/System.Data.SqlClient.dll",
"runtimes/unix/lib/netstandard2.0/System.Data.SqlClient.dll",
"runtimes/unix/lib/netstandard2.0/System.Data.SqlClient.xml",
"runtimes/win/lib/net451/System.Data.SqlClient.dll",
"runtimes/win/lib/net46/System.Data.SqlClient.dll",
"runtimes/win/lib/net461/System.Data.SqlClient.dll",
"runtimes/win/lib/net461/System.Data.SqlClient.xml",
"runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll",
"runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.xml",
"runtimes/win/lib/netstandard1.3/System.Data.SqlClient.dll",
"runtimes/win/lib/netstandard2.0/System.Data.SqlClient.dll",
"runtimes/win/lib/netstandard2.0/System.Data.SqlClient.xml",
"runtimes/win/lib/uap10.0.16299/System.Data.SqlClient.dll",
"runtimes/win/lib/uap10.0.16299/System.Data.SqlClient.xml",
"system.data.sqlclient.4.8.2.nupkg.sha512",
"system.data.sqlclient.nuspec",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"System.Security.AccessControl/4.7.0": {
"sha512": "JECvTt5aFF3WT3gHpfofL2MNNP6v84sxtXxpqhLBCcDRzqsPBmHhQ6shv4DwwN2tRlzsUxtb3G9M3763rbXKDg==",
"type": "package",
"path": "system.security.accesscontrol/4.7.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"LICENSE.TXT",
"THIRD-PARTY-NOTICES.TXT",
"lib/net46/System.Security.AccessControl.dll",
"lib/net461/System.Security.AccessControl.dll",
"lib/net461/System.Security.AccessControl.xml",
"lib/netstandard1.3/System.Security.AccessControl.dll",
"lib/netstandard2.0/System.Security.AccessControl.dll",
"lib/netstandard2.0/System.Security.AccessControl.xml",
"lib/uap10.0.16299/_._",
"ref/net46/System.Security.AccessControl.dll",
"ref/net461/System.Security.AccessControl.dll",
"ref/net461/System.Security.AccessControl.xml",
"ref/netstandard1.3/System.Security.AccessControl.dll",
"ref/netstandard1.3/System.Security.AccessControl.xml",
"ref/netstandard1.3/de/System.Security.AccessControl.xml",
"ref/netstandard1.3/es/System.Security.AccessControl.xml",
"ref/netstandard1.3/fr/System.Security.AccessControl.xml",
"ref/netstandard1.3/it/System.Security.AccessControl.xml",
"ref/netstandard1.3/ja/System.Security.AccessControl.xml",
"ref/netstandard1.3/ko/System.Security.AccessControl.xml",
"ref/netstandard1.3/ru/System.Security.AccessControl.xml",
"ref/netstandard1.3/zh-hans/System.Security.AccessControl.xml",
"ref/netstandard1.3/zh-hant/System.Security.AccessControl.xml",
"ref/netstandard2.0/System.Security.AccessControl.dll",
"ref/netstandard2.0/System.Security.AccessControl.xml",
"ref/uap10.0.16299/_._",
"runtimes/win/lib/net46/System.Security.AccessControl.dll",
"runtimes/win/lib/net461/System.Security.AccessControl.dll",
"runtimes/win/lib/net461/System.Security.AccessControl.xml",
"runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll",
"runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.xml",
"runtimes/win/lib/netstandard1.3/System.Security.AccessControl.dll",
"runtimes/win/lib/uap10.0.16299/_._",
"system.security.accesscontrol.4.7.0.nupkg.sha512",
"system.security.accesscontrol.nuspec",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"System.Security.Principal.Windows/4.7.0": {
"sha512": "ojD0PX0XhneCsUbAZVKdb7h/70vyYMDYs85lwEI+LngEONe/17A0cFaRFqZU+sOEidcVswYWikYOQ9PPfjlbtQ==",
"type": "package",
"path": "system.security.principal.windows/4.7.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"LICENSE.TXT",
"THIRD-PARTY-NOTICES.TXT",
"lib/net46/System.Security.Principal.Windows.dll",
"lib/net461/System.Security.Principal.Windows.dll",
"lib/net461/System.Security.Principal.Windows.xml",
"lib/netstandard1.3/System.Security.Principal.Windows.dll",
"lib/netstandard2.0/System.Security.Principal.Windows.dll",
"lib/netstandard2.0/System.Security.Principal.Windows.xml",
"lib/uap10.0.16299/_._",
"ref/net46/System.Security.Principal.Windows.dll",
"ref/net461/System.Security.Principal.Windows.dll",
"ref/net461/System.Security.Principal.Windows.xml",
"ref/netcoreapp3.0/System.Security.Principal.Windows.dll",
"ref/netcoreapp3.0/System.Security.Principal.Windows.xml",
"ref/netstandard1.3/System.Security.Principal.Windows.dll",
"ref/netstandard1.3/System.Security.Principal.Windows.xml",
"ref/netstandard1.3/de/System.Security.Principal.Windows.xml",
"ref/netstandard1.3/es/System.Security.Principal.Windows.xml",
"ref/netstandard1.3/fr/System.Security.Principal.Windows.xml",
"ref/netstandard1.3/it/System.Security.Principal.Windows.xml",
"ref/netstandard1.3/ja/System.Security.Principal.Windows.xml",
"ref/netstandard1.3/ko/System.Security.Principal.Windows.xml",
"ref/netstandard1.3/ru/System.Security.Principal.Windows.xml",
"ref/netstandard1.3/zh-hans/System.Security.Principal.Windows.xml",
"ref/netstandard1.3/zh-hant/System.Security.Principal.Windows.xml",
"ref/netstandard2.0/System.Security.Principal.Windows.dll",
"ref/netstandard2.0/System.Security.Principal.Windows.xml",
"ref/uap10.0.16299/_._",
"runtimes/unix/lib/netcoreapp2.0/System.Security.Principal.Windows.dll",
"runtimes/unix/lib/netcoreapp2.0/System.Security.Principal.Windows.xml",
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll",
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.xml",
"runtimes/win/lib/net46/System.Security.Principal.Windows.dll",
"runtimes/win/lib/net461/System.Security.Principal.Windows.dll",
"runtimes/win/lib/net461/System.Security.Principal.Windows.xml",
"runtimes/win/lib/netcoreapp2.0/System.Security.Principal.Windows.dll",
"runtimes/win/lib/netcoreapp2.0/System.Security.Principal.Windows.xml",
"runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll",
"runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.xml",
"runtimes/win/lib/netstandard1.3/System.Security.Principal.Windows.dll",
"runtimes/win/lib/uap10.0.16299/_._",
"system.security.principal.windows.4.7.0.nupkg.sha512",
"system.security.principal.windows.nuspec",
"useSharedDesignerContext.txt",
"version.txt"
]
}
},
"projectFileDependencyGroups": {
".NETCoreApp,Version=v3.1": [
"Microsoft.AspNetCore.Cryptography.KeyDerivation >= 5.0.1"
"Microsoft.AspNetCore.Cryptography.KeyDerivation >= 5.0.1",
"System.Data.SqlClient >= 4.8.2"
]
},
"packageFolders": {
@@ -112,6 +555,10 @@
"Microsoft.AspNetCore.Cryptography.KeyDerivation": {
"target": "Package",
"version": "[5.0.1, )"
},
"System.Data.SqlClient": {
"target": "Package",
"version": "[4.8.2, )"
}
},
"imports": [