feat(auth): AD-Authentifizierungsprüfung hinzugefügt
This commit is contained in:
parent
fa66e7ba0d
commit
59619702ab
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.
@ -66,7 +66,7 @@ namespace DigitalData.Core.API
|
||||
/// <param name="id">The identifier of the entity to retrieve.</param>
|
||||
/// <returns>A task that represents the asynchronous read operation. The task result contains the action result.</returns>
|
||||
[HttpGet("{id}")]
|
||||
public virtual async Task<IActionResult> GetById([FromRoute]TId id)
|
||||
public virtual async Task<IActionResult> GetById([FromRoute] TId id)
|
||||
{
|
||||
var result = await _service.ReadByIdAsync(id);
|
||||
if (result.IsSuccess)
|
||||
@ -113,7 +113,7 @@ namespace DigitalData.Core.API
|
||||
/// <param name="id">The identifier of the entity to delete.</param>
|
||||
/// <returns>A task that represents the asynchronous delete operation. The task result contains the action result.</returns>
|
||||
[HttpDelete("{id}")]
|
||||
public virtual async Task<IActionResult> Delete([FromRoute]TId id)
|
||||
public virtual async Task<IActionResult> Delete([FromRoute] TId id)
|
||||
{
|
||||
var result = await _service.DeleteAsyncById(id);
|
||||
if (result.IsSuccess)
|
||||
|
||||
@ -42,7 +42,7 @@ namespace DigitalData.Core.API
|
||||
/// <param name="id">The identifier of the entity to retrieve.</param>
|
||||
/// <returns>A task that represents the asynchronous read operation. The task result contains the action result.</returns>
|
||||
[HttpGet("{id}")]
|
||||
public virtual async Task<IActionResult> GetById([FromRoute]TId id)
|
||||
public virtual async Task<IActionResult> GetById([FromRoute] TId id)
|
||||
{
|
||||
var result = await _service.ReadByIdAsync(id);
|
||||
if (result.IsSuccess)
|
||||
|
||||
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.
@ -1,6 +0,0 @@
|
||||
namespace DigitalData.Core.Application
|
||||
{
|
||||
public class AuthService
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,7 @@ namespace DigitalData.Core.Application
|
||||
{
|
||||
var entity = _mapper.MapOrThrow<TEntity>(createDto);
|
||||
var createdEntity = await _repository.CreateAsync(entity);
|
||||
if(createdEntity is null)
|
||||
if (createdEntity is null)
|
||||
return Failed<TId>();
|
||||
else
|
||||
return Successful(KeyValueOf(createdEntity));
|
||||
@ -145,7 +145,7 @@ namespace DigitalData.Core.Application
|
||||
/// <returns>The ID of the entity.</returns>
|
||||
protected virtual TId KeyValueOf(TEntity entity)
|
||||
{
|
||||
if(_keyPropertyInfo is null)
|
||||
if (_keyPropertyInfo is null)
|
||||
throw new InvalidOperationException($"No property with [Key] attribute found on {typeof(TEntity).Name} entity.");
|
||||
|
||||
object idObj = _keyPropertyInfo?.GetValue(entity) ?? throw new InvalidOperationException($"The ID property of {typeof(TEntity).Name} entity cannot be null.");
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
27b4d1c0e521dbdcdae7e49ff5b85233b84a7ece
|
||||
9c98a8de39558d32de60bd00a4f3744b3887e0d2
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,11 +0,0 @@
|
||||
using System.DirectoryServices;
|
||||
|
||||
namespace DigitalData.Core.Contracts.Infrastructure
|
||||
{
|
||||
public interface IADDataAccessor
|
||||
{
|
||||
SearchResultCollection ReadAll();
|
||||
|
||||
SearchResult? ReadOne();
|
||||
}
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
using System.DirectoryServices;
|
||||
|
||||
namespace DigitalData.Core.Contracts.Infrastructure
|
||||
{
|
||||
public interface ISearcherProvider<ADDataAccessor>
|
||||
{
|
||||
public Func<DirectorySearcher> Provide { get; }
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
f4387e0fddd1173993a6db1f0ae947a265e040d2
|
||||
c04ab3cbc3319f5880fb96acc2dc1da3e8fd9daa
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@
|
||||
{
|
||||
"profiles": {
|
||||
"DigitalData.Core.CultureServices": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "https://localhost:61600;http://localhost:61602"
|
||||
}
|
||||
}
|
||||
}
|
||||
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.
@ -0,0 +1,12 @@
|
||||
{
|
||||
"profiles": {
|
||||
"DigitalData.Core.Infrastructure": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "https://localhost:61601;http://localhost:61604"
|
||||
}
|
||||
}
|
||||
}
|
||||
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.
12
DigitalData.Core.Tests/Properties/launchSettings.json
Normal file
12
DigitalData.Core.Tests/Properties/launchSettings.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"profiles": {
|
||||
"DigitalData.Core.Tests": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "https://localhost:61599;http://localhost:61603"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1171,7 +1171,8 @@
|
||||
"lib/net45/Microsoft.VisualStudio.CodeCoverage.Shim.dll",
|
||||
"lib/netcoreapp1.0/Microsoft.VisualStudio.CodeCoverage.Shim.dll",
|
||||
"microsoft.codecoverage.17.3.2.nupkg.sha512",
|
||||
"microsoft.codecoverage.nuspec"
|
||||
"microsoft.codecoverage.nuspec",
|
||||
"r5jqoi1l.cal"
|
||||
]
|
||||
},
|
||||
"Microsoft.CSharp/4.0.1": {
|
||||
@ -1306,6 +1307,7 @@
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"LICENSE_NET.txt",
|
||||
"hctajusm.1yt",
|
||||
"lib/net45/Microsoft.TestPlatform.CoreUtilities.dll",
|
||||
"lib/net45/Microsoft.TestPlatform.PlatformAbstractions.dll",
|
||||
"lib/net45/Microsoft.VisualStudio.TestPlatform.ObjectModel.dll",
|
||||
@ -1644,6 +1646,7 @@
|
||||
"build/uap10.0/zh-Hant/Microsoft.TestPlatform.Utilities.resources.dll",
|
||||
"build/uap10.0/zh-Hant/Microsoft.VisualStudio.TestPlatform.Common.resources.dll",
|
||||
"build/uap10.0/zh-Hant/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll",
|
||||
"jvo0yirh.p50",
|
||||
"lib/net45/_._",
|
||||
"lib/netcoreapp1.0/Microsoft.TestPlatform.CommunicationUtilities.dll",
|
||||
"lib/netcoreapp1.0/Microsoft.TestPlatform.CoreUtilities.dll",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user