Début du Stripe dans l'API (clés pas là)

This commit is contained in:
MarcEricMartel
2022-12-04 08:28:12 -08:00
parent 6cc93bade0
commit 21cb3f0aa3
8 changed files with 92 additions and 1 deletions

View File

@@ -1,11 +1,14 @@
using GrossesMitainesAPI.Data;
using GrossesMitainesAPI.Models;
using GrossesMitainesAPI.Services;
using Microsoft.AspNet.Identity;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Stripe;
using System.Net;
var MyAllowSpecificOrigins = "_myAllowSpecificOrigins";
@@ -24,6 +27,10 @@ builder.Services.AddCors(options => {
builder.Services.AddControllers();
builder.Services.Configure<StripeOptions>(options =>
builder.Configuration.GetSection("StripeTest").Bind(options)
);
builder.Services.AddIdentityCore<InventoryUser>()
.AddRoles<IdentityRole>()
.AddEntityFrameworkStores<InventoryContext>()