Hi,
It's by Azure SignalR design: https://github.com/dotnet/aspnetcore/issues/17617
You can try:
[Dependency(ReplaceServices = true)]
public class AzureSignalRRemoteServiceHttpClientAuthenticator : IdentityModelRemoteServiceHttpClientAuthenticator
{
public ICurrentPrincipalAccessor ICurrentPrincipalAccessor { get; set; }
public AzureSignalRRemoteServiceHttpClientAuthenticator(
IIdentityModelAuthenticationService identityModelAuthenticationService)
: base(identityModelAuthenticationService)
{
}
public override async Task Authenticate(RemoteServiceHttpClientAuthenticateContext context)
{
if (context.RemoteService.GetUseCurrentAccessToken() != false)
{
var accessToken = GetAccessTokenOrNullAsync();
if (accessToken != null)
{
context.Request.SetBearerToken(accessToken);
return;
}
}
await base.Authenticate(context);
}
protected virtual string? GetAccessTokenOrNullAsync()
{
var token = ICurrentPrincipalAccessor.Principal.FindFirst("access_token");
if (token == null)
{
return null;
}
return token.Value;
}
}
.AddAbpOpenIdConnect("oidc", options =>
{
......
options.Events.OnTokenResponseReceived = receivedContext =>
{
if (!string.IsNullOrWhiteSpace(receivedContext.TokenEndpointResponse.AccessToken)
&& receivedContext.Principal.Identity is ClaimsIdentity identity
&& !identity.HasClaim(c => c.Type == "access_token"))
{
identity.AddClaim(new Claim("access_token", receivedContext.TokenEndpointResponse.AccessToken));
}
return Task.CompletedTask;
};
});
Hi,
We add a new feature in the version 7.3: https://github.com/abpframework/abp/pull/16504
It should fix the problem.
Hi,
I reproduced the problem.
You can try remove typeof(AbpIdentityProDomainModule) from AdministrationServiceDomainModule
And add context.Services.AddTransient<AbpIdentityProSettingDefinitionProvider>(); to AdministrationServiceDomainModule.
ok,
I will try reproduce the problem.
Hi,
This is by design. you can try add your own exception.
For example:
public class MyValidationException : AbpValidationException, IUserFriendlyException
{
public MyValidationException(string message, List<ValidationResult> validationResults) : base(message: message,
validationResults)
{
}
}
var validations = new List() { new ValidationResult("File Size cannot be bigger than 5mb") };
throw new MyValidationException(message: "testing 1 2 3", validations);
We were able to reproduce the issue in a new abp project.
Could you share the project with me? shiwei.liang@volosoft.com. I will check it.
you need to custom the error handle. https://docs.abp.io/en/abp/latest/UI/Angular/HTTP-Requests#custom-http-error-handler
Hi,
You can check this: https://docs.abp.io/en/abp/latest/UI/Angular/HTTP-Requests#http-error-handling
Hi,
I think this is a new problem, could you create a new question for this? thanks.
You just need to uograde nugget packages after the patch version is released