Activities of "jmalla.cp"

And Where can I override this method, in AuthServer project?

Sorry but I can't see where.

In AuthServer project there are only two folders, Themes and pages. And pages only has Index without any Post method

Sorry but I don't undestand.

Can you give me an example?

Thanks

Hi,

Sorry, but not working. I just sent you new logs

Hi,

What namespace do I need, to use AbpAspNetCoreMvcClientCacheOptions?

Hi,

With your last recomendation I get this error.

ArgumentOutOfRangeException: The relative expiration value must be positive. (Parameter 'AbsoluteExpirationRelativeToNow')
Actual value was 00:00:00.

Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions.set_AbsoluteExpirationRelativeToNow(Nullable<TimeSpan> value)

    Stack Query Cookies Headers Routing 

    ArgumentOutOfRangeException: The relative expiration value must be positive. (Parameter 'AbsoluteExpirationRelativeToNow') Actual value was 00:00:00.
        Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions.set_AbsoluteExpirationRelativeToNow(Nullable<TimeSpan> value)
        Cincaporc.WebApp.Web.MyMvcCachedApplicationConfigurationClient+<>c.<GetAsync>b__13_1() in MyMvcCachedApplicationConfigurationClient.cs

                    () => new DistributedCacheEntryOptions

Volo.Abp.Caching.DistributedCache<TCacheItem, TCacheKey>.GetOrAddAsync(TCacheKey key, Func<Task<TCacheItem>> factory, Func<DistributedCacheEntryOptions> optionsFactory, Nullable<bool> hideErrors, bool considerUow, CancellationToken token)
Cincaporc.WebApp.Web.MyMvcCachedApplicationConfigurationClient.GetAsync() in MyMvcCachedApplicationConfigurationClient.cs

                configuration = await Cache.GetOrAddAsync(

Volo.Abp.AspNetCore.Mvc.Client.RemoteLanguageProvider.GetLanguagesAsync()
Microsoft.AspNetCore.RequestLocalization.DefaultAbpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync()
Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Question
  • ABP Framework version: v6.0.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Tired

After I follow this steps, https://support.abp.io/QA/Questions/4691/Clientid-permissions, can't solve my issue

To override the class OpenIddictSupportedLoginModel, but it dosen't work. The methos OnPostAsync inside that never runs.

I try to override the class LoginModel in AuthServer project, but in the method OnPostAsync the CurrentUser is null.

[Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(LoginModel))]
    public class CustomLoginModel : LoginModel
    {
        public CustomLoginModel(IAuthenticationSchemeProvider schemeProvider, IOptions<AbpAccountOptions> accountOptions, IAbpRecaptchaValidatorFactory recaptchaValidatorFactory, IAccountExternalProviderAppService accountExternalProviderAppService, ICurrentPrincipalAccessor currentPrincipalAccessor, IOptions<IdentityOptions> identityOptions, IOptionsSnapshot<reCAPTCHAOptions> reCaptchaOptions) : base(schemeProvider, accountOptions, recaptchaValidatorFactory, accountExternalProviderAppService, currentPrincipalAccessor, identityOptions, reCaptchaOptions)
        {
        }

        public override async Task<IActionResult> OnPostAsync(string action)
        {
            var clientIdClaim = CurrentUser.GetAllClaims().FirstOrDefault(x => x.Type == AbpClaimTypes.ClientId);
            if (clientIdClaim != null)
            {
                if (clientIdClaim.Value == "Internal")
                {
                    if (CurrentUser.IsInRole(Roles.RoleConsts.Internal))
                        return await base.OnPostAsync(action);
                    else
                        throw new AbpAuthorizationException();
                }
                if (clientIdClaim.Value == "Public")
                {
                    return await base.OnPostAsync(action);
                }
            }

            return await base.OnPostAsync(action);
        }
    }

What I can do, to get ClientId and Roles from user to try to login?

Thanks

Answer

Hi,

Wich namespace I need to call OpenIddictRequestHelper?

Thanks

Answer

Yes, but this is not a static class. How can I run this method inside my CustomLoginModel class

Thaks

Answer

Hi,

Thanks.

In OnPostAsync method the request.UserName is null

How can I get the username trying to logIn?

Showing 21 to 30 of 109 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on January 22, 2026, 11:30
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.