From 23e1db05c62f2a5ec0f6f097ca91a270555e02a5 Mon Sep 17 00:00:00 2001 From: Mahmut Gundogdu Date: Thu, 29 Dec 2022 13:25:19 +0300 Subject: [PATCH 1/4] Update Oauth-module.md docs --- docs/en/UI/Angular/OAuth-Module.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/en/UI/Angular/OAuth-Module.md b/docs/en/UI/Angular/OAuth-Module.md index a14b49bed0..f6a659d26a 100644 --- a/docs/en/UI/Angular/OAuth-Module.md +++ b/docs/en/UI/Angular/OAuth-Module.md @@ -7,8 +7,15 @@ Those abstractions can be found in the @abp/ng-core packages. - `AuthService` (the class that implements the IAuthService interface). - `NAVIGATE_TO_MANAGE_PROFILE` Inject token. - `AuthGuard` (the class that implements the IAuthGuard interface). +- `ApiInterceptor` (the class that implements the IApiInterceptor interface). + +Those base classes are overridden by the "AbpOAuthModule" for oAuth. Also there are three function that provided with AbpOAuthModule. + +- `PIPE_TO_LOGIN_FN_KEY` that provide to a function that will be called when the user is not authenticated. the function should be PipeToLoginFn type. +- `SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY` that provide to a function that will be called when the user is authenticated. the function should be SetTokenResponseToStorageFn type. +- `CHECK_AUTHENTICATION_STATE_FN_KEY` that provide to a function that will be called when the user is authenticated and store auth state. the function should be CheckAuthenticationStateFn type. +the tokens and interfaces in the `@abp/ng.core` package but the implementation of these interfaces is in the `@abp/ng.oauth` package. -Those base classes are overridden by the "AbpOAuthModule" for oAuth. If you want to make your own authentication system, you must also change these 'abstract' classes. -ApiInterceptor is provided by @abp/ng.oauth. The ApiInterceptor adds the token, accepted-language, and tenant id to the header of the HTTP request. +ApiInterceptor is provided by `@abp/ng.core` but overrided with `@abp/ng.oauth`. The ApiInterceptor adds the token, accepted-language, and tenant id to the header of the HTTP request. Also it call http-wait service. From e5c414f87cd6c2ad210210054dc97c68b08d7c28 Mon Sep 17 00:00:00 2001 From: Hamza Albreem <94292623+braim23@users.noreply.github.com> Date: Fri, 30 Dec 2022 10:49:56 +0300 Subject: [PATCH 2/4] Quick fix for the OAuth-Module doc --- docs/en/UI/Angular/OAuth-Module.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/UI/Angular/OAuth-Module.md b/docs/en/UI/Angular/OAuth-Module.md index f6a659d26a..e7a62d1d2e 100644 --- a/docs/en/UI/Angular/OAuth-Module.md +++ b/docs/en/UI/Angular/OAuth-Module.md @@ -9,13 +9,13 @@ Those abstractions can be found in the @abp/ng-core packages. - `AuthGuard` (the class that implements the IAuthGuard interface). - `ApiInterceptor` (the class that implements the IApiInterceptor interface). -Those base classes are overridden by the "AbpOAuthModule" for oAuth. Also there are three function that provided with AbpOAuthModule. +Those base classes are overridden by the "AbpOAuthModule" for oAuth. There are also three functions provided with AbpOAuthModule. -- `PIPE_TO_LOGIN_FN_KEY` that provide to a function that will be called when the user is not authenticated. the function should be PipeToLoginFn type. -- `SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY` that provide to a function that will be called when the user is authenticated. the function should be SetTokenResponseToStorageFn type. -- `CHECK_AUTHENTICATION_STATE_FN_KEY` that provide to a function that will be called when the user is authenticated and store auth state. the function should be CheckAuthenticationStateFn type. -the tokens and interfaces in the `@abp/ng.core` package but the implementation of these interfaces is in the `@abp/ng.oauth` package. +- `PIPE_TO_LOGIN_FN_KEY` a provide that calls a function when the user is not authenticated. The function should be PipeToLoginFn type. +- `SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY` a provide that calls a function when the user is authenticated. The function should be SetTokenResponseToStorageFn type. +- `CHECK_AUTHENTICATION_STATE_FN_KEY` a provide that calls a function when the user is authenticated and stores the auth state. The function should be CheckAuthenticationStateFn type. +The tokens and interfaces are in the `@abp/ng.core` package but the implementation of these interfaces is in the `@abp/ng.oauth` package. If you want to make your own authentication system, you must also change these 'abstract' classes. -ApiInterceptor is provided by `@abp/ng.core` but overrided with `@abp/ng.oauth`. The ApiInterceptor adds the token, accepted-language, and tenant id to the header of the HTTP request. Also it call http-wait service. +ApiInterceptor is provided by `@abp/ng.core` but overridden with `@abp/ng.oauth`. The ApiInterceptor adds the token, accepted-language, and tenant id to the header of the HTTP request. It also calls the http-wait service. From 67942c06f95793415be146a0bc6487cec682da7c Mon Sep 17 00:00:00 2001 From: muhammedaltug Date: Mon, 2 Jan 2023 15:10:46 +0300 Subject: [PATCH 3/4] localize enum key in select --- docs/en/Tutorials/Part-3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Tutorials/Part-3.md b/docs/en/Tutorials/Part-3.md index bc5e899f2d..df40eba1cd 100644 --- a/docs/en/Tutorials/Part-3.md +++ b/docs/en/Tutorials/Part-3.md @@ -789,7 +789,7 @@ Open `/src/app/book/book.component.html` and replace ` Type * From 0ecfc7fa34ef04da2eee4976beae1b31bc98e041 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Mon, 2 Jan 2023 17:41:21 +0300 Subject: [PATCH 4/4] abp-select tag helper: Check enum values as underlying type for localization --- .../TagHelpers/Form/AbpSelectTagHelperService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs index 9e60cbc75f..78ef04d1d5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs @@ -265,7 +265,7 @@ public class AbpSelectTagHelperService : AbpTagHelperService var containerLocalizer = _tagHelperLocalizer.GetLocalizerOrNull(explorer.Container.ModelType.Assembly); - foreach (var enumValue in enumType.GetEnumValues()) + foreach (var enumValue in enumType.GetEnumValuesAsUnderlyingType()) { var localizedMemberName = _abpEnumLocalizer.GetString(enumType, enumValue, new[]