Updated:
https://drive.google.com/file/d/1vQTsEMRmB9gVlrf1OqAYlnfw-K0WyU3u/view?usp=sharing
Done:
Updated Log:
https://drive.google.com/file/d/1Uwib25_aYeCnefpyUzAS2crUDT39vpUT/view?usp=sharing
Waiting for your response
The token request was successfully extracted: { "grant_type": "authorization_code", "code": "[redacted]", "client_id": "AppName_Swagger", "redirect_uri": "https://my-domain/swagger/oauth2-redirect.html" }
The response was successfully returned as a JSON document: { "error": "invalid_grant", "error_description": "The specified token is invalid.", "error_uri": "https://documentation.openiddict.com/errors/ID2004" }.
Please note that there is no changes on code has been made
for more info, I added log here: https://drive.google.com/file/d/1KVqn0XN3wjbAsq4oPMxAiH3QrzfVzSOb/view?usp=sharing
Yes It was solved, Thank you
The solution was to create a reference for identity service module (not the administration service module)
using : https://docs.abp.io/en/commercial/latest/startup-templates/microservice/synchronous-interservice-communication
The solution was to create a reference for identity service module (not the administration service module)
using : https://docs.abp.io/en/commercial/latest/startup-templates/microservice/synchronous-interservice-communication
Thank you for your prompt answer!
Please provide me with more details, I cannot find IPermissionIntegrationService I searched for it all my solution, Not sure which dependency should I use,
And finally Plaese provide with a blog or documentation reference for that is possible
Thank you
I have a micro service (for example called Products Microservice) in that microservice I would like to check if a specific user has a permission, this user is not the current user, (I have his email only)
Kindly suggest all available solutions, the best solution that does not make me made connection to administration.
I think I need to use: var rs = await authorizationService.AuthorizeAsync(ClaimsPrincipal, requiredPolicy); but I do not have the (ClaimsPrincipal) and how can I get an instance of it related a specific user ? and is this good solution ?
Kindly advice
I have a customer scenario, so the application when it starts, it waiting for external event (using a third party), when the event is happend, But when the event is triggered, I should be able to use dependency injection, When I try to access the Service Provider, I get the error above, here is a code sample:
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var configuration = context.GetConfiguration();
var SelfUrl = configuration["App:SelfUrl"];
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
var buses = context.ServiceProvider.GetServices<ServiceBusProcessor>();
foreach (var processor1 in buses)
{
processor1.ProcessMessageAsync += (ProcessMessageEventArgs args) => ProcessMessageHandler(context, args);
processor1.ProcessErrorAsync += ErrorHandler;
processor1.StartProcessingAsync().GetAwaiter().GetResult();
}
}
private async Task ProcessMessageHandler(ApplicationInitializationContext context, ProcessMessageEventArgs args) {
var serviceProvider = context.ServiceProvider ;
using (var scope = serviceProvider.CreateScope())
{
var handler = serviceProvider.GetService<TraineeProfileUpdateJobHandler>(); // this is throws an error
var handler2 = scope.ServiceProvider.GetService<TraineeProfileUpdateJobHandler>(); // this is throws an error
await handler.ExecuteAsync(parsed);
}
}
2023-05-21 17:07:47.946 +03:00 [ERR] An exception was thrown while deserializing the token. Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. ---> System.Security.Cryptography.CryptographicException: The key {d8fbc7f5-259b-455a-b1f4-89121eb1d364} was not found in the key ring. For more information go to http://aka.ms/dataprotectionwarning at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData) at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) --- End of inner exception stack trace --- at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)