Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api-plugin-for-commerce #206

Open
wants to merge 43 commits into
base: nopCommerce_4.00
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9127a78
WIP. Fixed build errors when updating to nopCommerce 4.1.
SDobrev Aug 2, 2018
9d2045b
W.I.P. Fixed a few runtime errors. Commented the Webhooks logic.
SDobrev Aug 10, 2018
4bca155
Migration to 4.1 (WIP)
toddca Aug 24, 2018
3b978ae
Fixed regression due to code cleanup
toddca Aug 24, 2018
d5d01c9
Fixed a false check that was removed during the upgrade
poyker Aug 28, 2018
7020e92
Merge branch 'nopCommerce_4.10_dev' of https://github.com/toddca/api-…
poyker Aug 31, 2018
81532af
Merge upstream to Aperture fork
Sep 11, 2018
4e6c5e7
Remove "distinct by ID" from categories query (not needed, and was br…
Sep 12, 2018
ed0c03a
Tweak customer query so that it works with EF Core (can't access Cust…
Sep 12, 2018
6f76d38
Remove "distinct by ID" from products query (not needed, and was brea…
Sep 12, 2018
2b36e30
Refactor Fluent Validation and JSON model binding. Validators are no…
Sep 18, 2018
c0c00fb
Implement BaseDto/BaseDtoValidator on all DTO objects; also refactor …
Sep 18, 2018
f3f3f9e
Refactor/rename parts of BaseDtoValidator; fix validation for Custome…
Sep 20, 2018
0f743f9
Refactor/fix validation for child collections on OrderDto and Custome…
Sep 20, 2018
a927149
Rename CustomerDto.CustomerAddresses to CustomerDto.Addresses (match …
Sep 21, 2018
b80099a
Update BaseDtoValidator so it's usable both when resolved by DI and m…
Sep 21, 2018
71f7067
Update MappingHelper to handle collections that cannot be cast to ILi…
Sep 21, 2018
c1b7e88
Validate OrderDto.ShippingAddress and OrderDto.BillingAddress in Orde…
Sep 21, 2018
7022760
Merge pull request #148 from ApertureLabsInc/nopCommerce_4.10_dev
poyker Sep 25, 2018
86b58d6
Allow the API plugin to be installed during a "clean" nopCommerce ins…
poyker Sep 26, 2018
2172e83
Fixed an issue with the Api Clients not properly saved and edited in …
poyker Sep 27, 2018
6d965bd
Merge 4.0 branch to 4.1
Sep 27, 2018
a31a203
Merge pull request #153 from ApertureLabsInc/nopCommerce_4.10_dev
poyker Sep 28, 2018
8f3bf19
Merge branch 'nopCommerce_4.10_dev' of https://github.com/SevenSpikes…
poyker Sep 28, 2018
9246ec3
Expose ProductAttributeCombinations from Product API
Oct 9, 2018
5c3a7a1
Add "PicutreId" to ImageMappingDto (allows consumer to tie ProductPic…
Oct 23, 2018
0a04240
Fix duplicate ProductAttributeCombinations/ProductSpecifciationAttrib…
Oct 24, 2018
182e99e
Add "CustomerGuid" to CustomerDto
Oct 30, 2018
2e31350
Added Manufacturer endpoints.
SDobrev Nov 26, 2018
b4908bd
Added support for Product Manufacturer Mappings.
SDobrev Nov 27, 2018
380caab
Fixed a few comments and parameter names.
SDobrev Nov 27, 2018
4f89eb7
Added ManufacturerDto validator.
SDobrev Nov 27, 2018
6e6d98e
Merge pull request #161 from ApertureLabsInc/nopCommerce_4.10
poyker Nov 28, 2018
fcf0ae1
Added support for WebHooks. Still work in progress
poyker Nov 29, 2018
73d2d1d
Persist the WebHook registrations
poyker Dec 5, 2018
ca92b1d
Added a huge performance improvements for /api/orders and /api/custom…
poyker Dec 12, 2018
2f84486
Merge branch 'nopCommerce_4.10' of https://github.com/SevenSpikes/api…
poyker Dec 17, 2018
1bd3c62
Fix for the Login route
poyker May 8, 2019
8f09f6d
Add renovate.json
renovate-bot Jul 11, 2019
f2604ee
Merge pull request #2 from SevenSpikes/nopCommerce_4.10_WebHooks
Gamingpc Jul 12, 2019
976f5db
Revert "Fix for the Login route"
Gamingpc Jul 12, 2019
cb59509
Merge pull request #3 from Gamingpc/revert-2-nopCommerce_4.10_WebHooks
Gamingpc Jul 12, 2019
761ebec
Merge pull request #1 from Gamingpc/renovate/configure
Gamingpc Jul 16, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Libs/Microsoft.AspNetCore.WebHooks.Sender.dll
Binary file not shown.
76 changes: 38 additions & 38 deletions Nop.Plugin.Api/ApiAuthentication.cs
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
namespace Nop.Plugin.Api
{
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Tokens;
using Nop.Plugin.Api.Helpers;
using Nop.Services.Authentication.External;
using Org.BouncyCastle.Asn1.X509.Qualified;

public class ApiAuthentication : IExternalAuthenticationRegistrar
{
public void Configure(AuthenticationBuilder builder)
{
RsaSecurityKey signingKey = CryptoHelper.CreateRsaSecurityKey();
builder.AddJwtBearer(JwtBearerDefaults.AuthenticationScheme, jwt =>
{
jwt.Audience = "nop_api";
jwt.TokenValidationParameters = new TokenValidationParameters
{
ValidateActor = false,
ValidateIssuer = false,
NameClaimType = JwtClaimTypes.Name,
RoleClaimType = JwtClaimTypes.Role,
// Uncomment this if you are using an certificate to sign your tokens.
// IssuerSigningKey = new X509SecurityKey(cert),
IssuerSigningKeyResolver = (string token, SecurityToken securityToken, string kid,
TokenValidationParameters validationParameters) =>
new List<RsaSecurityKey> { signingKey }
};
});
}
}
namespace Nop.Plugin.Api
{
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Tokens;
using Nop.Plugin.Api.Helpers;
using Nop.Services.Authentication.External;
using Org.BouncyCastle.Asn1.X509.Qualified;
public class ApiAuthentication : IExternalAuthenticationRegistrar
{
public void Configure(AuthenticationBuilder builder)
{
RsaSecurityKey signingKey = CryptoHelper.CreateRsaSecurityKey();
builder.AddJwtBearer(JwtBearerDefaults.AuthenticationScheme, jwt =>
{
jwt.Audience = "nop_api";
jwt.TokenValidationParameters = new TokenValidationParameters
{
ValidateActor = false,
ValidateIssuer = false,
NameClaimType = JwtClaimTypes.Name,
RoleClaimType = JwtClaimTypes.Role,
// Uncomment this if you are using an certificate to sign your tokens.
// IssuerSigningKey = new X509SecurityKey(cert),
IssuerSigningKeyResolver = (string token, SecurityToken securityToken, string kid,
TokenValidationParameters validationParameters) =>
new List<RsaSecurityKey> { signingKey }
};
});
}
}
}
Loading