Compare commits
3
Commits
48395457e6
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b00391517a | ||
|
|
e1e151a834 | ||
|
|
cd2b06b913 |
@@ -1,12 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xIdentityHelper;
|
||||
using xCommons.Attributes;
|
||||
using xCommons.Extensions;
|
||||
using xIdentityModels.Dtos;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using static IdentityServer4.IdentityServerConstants;
|
||||
|
||||
namespace xIds.Controllers
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using IdentityModel.Client;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xIdentityHelper;
|
||||
using xCommons.Attributes;
|
||||
using xCommons.Extensions;
|
||||
using IdentityModel.Client;
|
||||
using xExceptions.Constants;
|
||||
using xIdentityModels.Extensions;
|
||||
using System.Threading.Tasks;
|
||||
using xIdentityModels.Models;
|
||||
using static IdentityServer4.IdentityServerConstants;
|
||||
using static xIdentityHelper.XApiScopeHelper;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xIdentityModels.Extensions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using static xIdentityHelper.XApiScopeHelper;
|
||||
using static IdentityServer4.IdentityServerConstants;
|
||||
|
||||
namespace xIds.Controllers
|
||||
{
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xModels.Dtos;
|
||||
using xIdentityHelper;
|
||||
using xCommons.Attributes;
|
||||
using xCommons.Extensions;
|
||||
using xExceptions.Constants;
|
||||
using xIdentityHelper;
|
||||
using xIdentityModels.Constants;
|
||||
using xIdentityModels.Dtos;
|
||||
using xExceptions.Constants;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xIdentityModels.Constants;
|
||||
using System.Collections.Generic;
|
||||
using xIdentityModels.Navigations;
|
||||
using xModels.Dtos;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using static IdentityServer4.IdentityServerConstants;
|
||||
|
||||
namespace xIds.Controllers
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xCommons.Attributes;
|
||||
using xCommons.Constants;
|
||||
using xCommons.Attributes;
|
||||
using xIdentityModels.Dtos;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace xIds.Controllers
|
||||
{
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xModels.Dtos;
|
||||
using xIdentityHelper;
|
||||
using xCommons.Attributes;
|
||||
using xCommons.Extensions;
|
||||
using xIdentityModels.Dtos;
|
||||
using System.Threading.Tasks;
|
||||
using xIdentityModels.Models;
|
||||
using xModels.Dtos;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using static IdentityServer4.IdentityServerConstants;
|
||||
|
||||
namespace xIds.Controllers
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xModels.Dtos;
|
||||
using xIdentityHelper;
|
||||
using xCommons.Attributes;
|
||||
using xCommons.Extensions;
|
||||
using xIdentityHelper;
|
||||
using xModels.Dtos;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using static IdentityServer4.IdentityServerConstants;
|
||||
|
||||
namespace xIds.Controllers
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xIdentityHelper;
|
||||
using xCommons.Attributes;
|
||||
using xCommons.Extensions;
|
||||
using xExceptions.Constants;
|
||||
using xIdentityModels.Constants;
|
||||
using System.Threading.Tasks;
|
||||
using xIdentityModels.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using xIdentityModels.Constants;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using static IdentityServer4.IdentityServerConstants;
|
||||
|
||||
namespace xIds.Controllers
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xModels.Dtos;
|
||||
using xIdentityHelper;
|
||||
using xCommons.Attributes;
|
||||
using xCommons.Extensions;
|
||||
using xIdentityHelper;
|
||||
using xIdentityModels.Dtos;
|
||||
using xModels.Dtos;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using static IdentityServer4.IdentityServerConstants;
|
||||
|
||||
namespace xIds.Controllers
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xIdentityHelper;
|
||||
using xCommons.Attributes;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using static IdentityServer4.IdentityServerConstants;
|
||||
|
||||
namespace xIds.Controllers
|
||||
@@ -156,6 +156,19 @@ namespace xIds.Controllers
|
||||
//
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
[RequireXPowered]
|
||||
[HttpGet("Test/HiApiKeyAccess")]
|
||||
[Authorize(LocalApi.PolicyName)]
|
||||
[Authorize(Policy = XPolicies.ApiKeyAccess)]
|
||||
public ActionResult<string> HiApiKeyAccess()
|
||||
{
|
||||
//
|
||||
var result = $"Hi ApiKey Access, is Passed ...";
|
||||
|
||||
//
|
||||
return Ok(result);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xIds.Interfaces;
|
||||
using xCommons.Providers;
|
||||
using xIds.Controllers.Base;
|
||||
using xIds.Interfaces;
|
||||
using xCommons.Configurations;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace xIds.Controllers
|
||||
{
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace xIds.Controllers
|
||||
{
|
||||
public partial class ApplicationsController
|
||||
{
|
||||
//
|
||||
#region ApiKey ...
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace xIds.Controllers
|
||||
{
|
||||
public partial class ApplicationsController
|
||||
{
|
||||
//
|
||||
#region ApiKeyUsage ...
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using xIdentityHelper;
|
||||
using System.Threading;
|
||||
using xCommons.Attributes;
|
||||
using xIdentityModels.Dtos;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using static IdentityServer4.IdentityServerConstants;
|
||||
|
||||
namespace xIds.Controllers
|
||||
{
|
||||
public partial class ApplicationsController
|
||||
{
|
||||
//
|
||||
#region Application ...
|
||||
[HttpPost]
|
||||
[RequireXPowered]
|
||||
[Authorize(LocalApi.PolicyName)]
|
||||
[Authorize(Policy = XPolicies.EnabledUser)]
|
||||
public async Task<ActionResult<XApplicationDto>> CreateApplication(
|
||||
[FromBody] XApplicationDto request,
|
||||
CancellationToken cancellationToken = default
|
||||
)
|
||||
{
|
||||
//
|
||||
throw new NotImplementedException("");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using xIds.Interfaces;
|
||||
using xCommons.Providers;
|
||||
using xIds.Controllers.Base;
|
||||
using xCommons.Configurations;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace xIds.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide all available tools for manipulating users and accounts
|
||||
/// </summary>
|
||||
[ApiController]
|
||||
public partial class ApplicationsController : XIBaseController
|
||||
{
|
||||
public ApplicationsController(
|
||||
ILogger<ApplicationsController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityManager identityManager,
|
||||
XValidationProvider validationProvider
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
identityManager,
|
||||
validationProvider
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -204,6 +204,9 @@ namespace xIds.DI
|
||||
{
|
||||
//
|
||||
source.AddXApiKeyConfiguration(configuration);
|
||||
|
||||
//
|
||||
source.AddMemoryCache();
|
||||
source.AddScoped<IXApplicationProvider, XApplicationProvider>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user