Commit Graph

400 Commits

Author SHA1 Message Date
Cédric Michel
6041a1f183 Use cancellation token in repository and web fie system (http call can cancelled) (#471)
Co-authored-by: cmichel <cmichel@interparking.com>
2020-11-30 12:21:19 -05:00
Onur BIYIK
2502e01efd Fix for Nullreference exception when public api authenticate endpoint called with invalid username. (#482) 2020-11-14 14:15:08 -05:00
Tim Heuer
c2fe05dbd4 Fix favicon.ico build bug and modify CI to run on PR (#479) 2020-11-10 21:22:14 -05:00
Steve Smith
2e9ac0f6e5 Update README.md 2020-10-28 14:09:31 -04:00
Steve Smith
d32c490d73 Removing docs folder to keep repo size smaller 2020-09-14 13:07:23 -04:00
Steve Smith
01174bb677 Update eBook with v3.1 2020-09-11 17:24:41 -04:00
Shady Nagy
d5610aad12 Upgrade ardalis.ApiEndpoints to v2. (#451) 2020-08-07 17:19:32 -04:00
Steve Smith
754c845e9f Upgrade to use Specification 4.0.0 (#444) 2020-07-31 14:52:14 -04:00
Shady Nagy
e520126857 Docker working without Configure ConfigureAppConfiguration (#443)
* Docker working without Configure ConfigureAppConfiguration.

* Sort modifiers
2020-07-31 12:05:37 -04:00
Steve Smith
f901db156a Removing AuthService and fixing Dockerfile for PublicApi 2020-07-31 00:19:17 -04:00
Steve Smith
e9a9dc06d7 Updating Blazor Admin (#442)
* Updating Blazor services

* Adding Settings and Refactoring Services

* WIP - Fighting with DI

* Configuring dependencies in both Web Startup and BlazorAdmin Program.cs has them working again.

* Everything works; need to optimize calls to ListBrands

* LocalStorageBrandService decorator working

* Added cache duration of 1 minute

* Refactoring to reduce token storage
Fixed issue with dropdowns binding to int

* Remove token stuff from login; moved to CustomAuthStateProvider

* Migrated CatalogTypes to separate service
Implemented cache decorator

* Ardalis/blazor refactor (#440)

* 1. Migrate CatalogItemServices -> CatalogItemService.
3. Add caching to CatalogItemService.

* change to $"Loading {key} from local storage" ?

* docker settings added. (#441)

* docker settings added.

* InDocker Removed

* InDocker removed from web startup.

* removed unused using

* no reload list if close without save

* startup patch for localhost

* file name fixed

* removed docker from launchSettings.

* Configure logging via appsettings

Co-authored-by: Shady Nagy <info@shadynagy.com>
2020-07-30 23:50:51 -04:00
Shady Nagy
98fb0ee8ce Removed WebUrl from AuthService (#438) 2020-07-29 12:21:40 -04:00
Shady Nagy
b640926a19 Shady nagy/remove newton soft (#436)
* replace NewtonSoft with System.Text.Json

* not use auth for brande and types and use GetFromJsonAsync

* fix

* fix

* Auth HttpGet more simple.

* Put, Delete and Post  more simple.

* Fixed Edit for remove image and keep image and change other fields.
Added description required in Blazor Admin.

* Removed using not used

* Refactor AuthService and introduce HttpService. add validation for price.

* return null in HttpService if not success.

* Limt Price to 1000 mximum

* DI for Blazor Services

* one blazor service.

* fix
2020-07-29 10:28:55 -04:00
Shady Nagy
24cf9be6ae Fix unit test SavePicture function (#435) 2020-07-28 17:33:21 -04:00
Steve Smith
3ee9fff14a Fix using 2020-07-28 17:02:33 -04:00
Shady Nagy
4e935df311 Image added (#434)
* Image added

* ImageMaximumBytes

* FileController remove Authorized

* ApplicationCore.Constants.AuthorizationConstants.AUTH_KEY

* SavePicture in the interface.

* IFileSystem in Core

* WebFileSystem in Infrastructure

* PictureUri removed from UpdateCatalogItemRequest

* Modal scroll fix
2020-07-28 17:00:32 -04:00
Steve Smith
b30b0c2eef Code cleanup 2020-07-28 16:12:50 -04:00
Steve Smith
2c9c7dd3d1 Code cleanup 2020-07-28 15:35:48 -04:00
Steve Smith
ec5ffefb31 Update README.md 2020-07-27 12:07:31 -04:00
Shady Nagy
40214cc6e0 image style added. (#433)
* image style added.

* JSInteropConstants added

* JSInteropConstants
2020-07-27 10:07:15 -04:00
Shady Nagy
688064199d Docker Fix (#431)
* static added to Constants

* Docker support for Blazor

* GetHttp, PostHttp, ... inside AuthService, Docker working with login, Cookies Configuration temporary disabled

* BaseAddress get web uri from Blazor Shared.

* cookie options changed to fix docker.

* Fixed returnUrl when inserting admin link and navigate without login

* Functions not used removed.

* AddPolicy using GetWebUrl

* Login link removed from NavMenu

* Change ConfigureCookieSettings, ConfigureCoreServices and ConfigureWebServices to be IServiceCollection extentions.

* GetOriginWebUrl added.

* Auto InDocker switch added.

* Removed not used using .
2020-07-27 09:06:18 -04:00
Shady Nagy
e1f9ddd192 BlazorShared and Services (#430)
* Service to Services

* Change Shared project to BlazorShared

* change refrerances to BlazorShared
2020-07-25 17:28:21 -04:00
Steve Smith
f4bfc81fe8 Updating README with running the sample instructions 2020-07-25 17:04:23 -04:00
Steve Smith
9eb120b81e remove usings 2020-07-25 16:56:24 -04:00
Shady Nagy
4e886183ce Shady nagy/blazor enhance (#429)
* - Using cdnjs not nuget on bootstrap and signalr.
- Bootstrap modal used for add, edit details and delete.

* EditForm inside modal-content

* Top close button action added

* Removed unused using.

* DeleteCookies moved inside AuthService

* ApplicationCore removed from BlazorAdmin dependencies

* SecureHttpClient removed

* Logout from identity manager added

* last thing to do in logout from admin is LogoutIdentityManager.

* JSRuntime used in AuthService without pass to the functions

* Link fixed when logout from MVC
2020-07-25 16:39:21 -04:00
Steve Smith
f582182698 Update README.md 2020-07-24 12:40:49 -04:00
Steve Smith
68f29a55e4 Update README.md 2020-07-24 12:39:35 -04:00
Steve Smith
8d3ac693d4 Add Blazor WebAssembly Admin Page (#426)
* Added Blazor Client
Configured PublicAPI CORS to allow traffic from client

* Make admin page home page; remove extra pages
Add CatalogType list endpoint

* Wired up Types and Brands in the API and the admin list page

* Adding a custom HttpClient to talk securely to API

* Ardalis/blazor (#419)

* Login added

* AuthService will handel http request secure and not secure.

* Logout added

* CatalogBrandService in it is own service

* Get token from localstorage when refresh.

* used GetAsync

* Fixed Login and Logout switch.

* CatalogItemService added

* CatalogTypeService added & Auth for CatalogType.
using not used removed.

* Made BlazorComponent and BlazorLayoutComponent for refresh.
Index now small enough to be in one file.

* Removed the service from program main and use lazy singleton.

* used OnInitialized

* Refactoring and detecting login status in login.razor

* Refactoring login to redirect if user is already logged in

* Blazor login with MVC (#420)

* Blazor login with MVC

* return back the PasswordSignInAsync in Login page

* CRUD added (#422)

* CRUD added

* Unit Test changed to meet new redirect /admin

* CreateCatalogItemRequest added.

* Action caption added.

* Validation added for name and price.

* Updated port of api
Redirect to returnUrl from login

* Add username to /admin; link to my profile

* Working on authorization of /admin

* Working on custom auth locking down /admin page

* Microsoft authorize working.Login.razor removed.Login from SignInMana… (#425)

* Microsoft authorize working.Login.razor removed.Login from SignInManager and create token from it.unit test fixed.

* GetTokenFromController function used in CustomAuthStateProvider

* Cleaned up button styles
Refactored to use codebehind for List component
Updated Not Authorized view

Co-authored-by: Shady Nagy <shadynagi@gmail.com>
2020-07-24 12:36:47 -04:00
Steve Smith
4253660bc3 Merging with remote master 2020-07-10 11:54:11 -04:00
Steve Smith
1c75f08a33 Add catalogitem update endpoint to public api (#418)
* Initial update endpoint working

* Updated CatalogItem to support more updates; added tests

* Got MediatR domain events working to check for duplicate item names

* Adding reference link

* Remove domain events spike code

* clean up usings
2020-07-10 11:50:46 -04:00
Steve Smith
2911d5821e Updated CatalogItem to support more updates; added tests 2020-07-03 12:46:33 -04:00
Steve Smith
14fbb4284a Initial update endpoint working 2020-07-03 12:17:46 -04:00
Eric Fleming
f89c20ee64 Update docker compose to include new Public API project (#414)
* Updating docker compose and override to also start the public api

* Update README
2020-06-30 20:52:26 -04:00
Steve Smith
dd5a435cb4 Adding Endpoints with Authorization in separate PublicApi project (#413)
* Adding tests for GetById endpoint

* Updating tests and messages

* Adding paged endpoint and also AutoMapper

* Authenticate endpoint works as bool with tests

* Got JWT token security working with Create and Delete endpoints and Swashbuckle.

* Working on getting cookie and jwt token auth working in the same app
All tests are passing

* Creating new project and moving APIs
Build succeeds; tests need updated.

* all tests passing after moving services to PublicApi project

* Fix authorize attributes

* Uncomment and update ApiCatalogControllerLists tests

Co-authored-by: Eric Fleming <eric-fleming18@hotmail.com>
2020-06-30 11:36:28 -04:00
Eric Fleming
e5e9868003 Refactor startup (#412)
* Removing unused folder

* Refactoring Startup.cs
2020-06-29 14:00:54 -04:00
Steve Smith
b4d0f07c2e Adding API Endpoints for Catalog Items (#410)
* Adding new Endpoints

* update nuget packages

* Modifying API to work well with Swagger.

* Remove Swashbuckle.Core
2020-06-25 16:23:44 -04:00
yigith
3b1339787f 401 fix (#408)
* transfer basket on login

* review page

* unit tests for TransferBasketAsync
2020-06-24 20:48:23 -04:00
Eric Fleming
a4d02d9dad Updated Unit tests after recent changes (#409) 2020-06-21 20:02:34 -04:00
yigith
5c0f7fae29 preserve filters while paginating (#405) 2020-06-20 21:35:29 -04:00
Eric Fleming
a0ba412bc8 Adding additional unit tests (#406)
* Creating new test class for RemoveEmptyItems

* Adding tests for AddItemToBasket in BasketService

* Removing unused GetBasketItemCountAsync

* Adding tests for BasketWithItemsSpecification

* Adding CustomerORdersWithItemsSpecification tests

* Adding CatalogFilterPaginatedSpecifciation tests

* Adding CatalogItemsSpecification tests
2020-06-20 21:35:05 -04:00
Eric Fleming
d8848a96fb Carry basket with login (#404)
* Updating Checkout screen to login correctly when checking out

* Cleanup cshtml
2020-06-17 21:14:02 -04:00
yigith
2909132381 adding specification for getting items (#403)
* items specification

* adding specification for items
2020-06-17 20:30:47 -04:00
yigith
40a1bb4b89 Making AddRange async (#399) 2020-06-16 09:11:39 -04:00
yigith
623ec49ed7 Making "any" async (#397)
* Making "any" async

* Removed unused using

Co-authored-by: Eric Fleming <eric-fleming18@hotmail.com>
2020-06-15 13:07:15 -04:00
Eric Fleming
18589f9a73 Make testing name scheme consistent (#395)
* Updating CahceHelperTests names

* Updating OrdersTests names

* Removing tests for "Include" functionality as it lives in a NuGet Package now

* Updating Integration Test anems
2020-06-14 20:55:00 -04:00
Eric Fleming
248b8ed632 Prevent negative item orders (#392)
* Pulling changes over from previous branch

* Adding exception and guard clause
2020-06-12 21:06:23 -04:00
David Pine
0af21d22f5 Inspired by dotnet show (#386)
* Changed the order of the projects, Web first to infer as startup.

* Added encapsulated JSON serialization - and moved to System.Text.Json

* Refactored a few minor updates out

Co-authored-by: Eric Fleming <eric-fleming18@hotmail.com>
2020-06-11 15:47:05 -04:00
Eric Fleming
70a919e145 Switching to NuGet Ardalis.Specifications (#389)
- updating to use Ardalis.Specifications package as it is maintained and has a more robust implementation
- Removing all custom specification implementation
- Updating unit tests
2020-06-08 13:31:22 -04:00
Ankit Sinha
1b5b12ec11 configured devcontainer properly (#384)
* configured  devcontainer properly

* made vscode owner of .dotnet

Co-authored-by: Ankit Sinha <anksinha@microsoft.com>
2020-06-02 11:40:34 -04:00
Maira Wenzel
b47e5bfbdf Update docs links (#387) 2020-05-28 17:28:23 -04:00