-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Good afternoon.
I am attempting to implement a custom lifetime validator for our harmony core service to adapt for possible offline conditions with our identity service.
I have followed examples that are written in C# to try to do this but I cannot get the DBL compiler to accept my adjustments.
I'm getting the following error message when I am trying to assign the custom validator to my token validation parameters.
%DBL-E-REQPARM, Missing required parameter 1 in routine GetRequiredService : & }
Following is the source code line where the assignment is being made
lambda configJwt(o)
begin
o.RequireHttpsMetadata = false
o.IncludeErrorDetails = true
o.ClaimsIssuer = AuthenticationTools.GetIssuer()
o.Audience = AuthenticationTools.GetAudience()
o.TokenValidationParameters = new TokenValidationParameters()
& {
& ValidateIssuer = true,
& ValidIssuer = AuthenticationTools.GetIssuer(),
& ValidateAudience = true,
& ValidAudience = AuthenticationTools.GetAudience(),
& ValidateIssuerSigningKey = true,
& IssuerSigningKeys = AuthenticationTools.GetJwks(),
& RequireExpirationTime = true,
& ValidateLifeTime = true,
& LifetimeValidator = new MyTokenValidationService(serviceProvider.GetRequiredService<IHttpContextAccessor>()).ValidateLifetime,
& RequireSignedTokens = true
& }
This is somewhat of a time critical request as we are trying to implement this before we go to production. I need assistance in implementing this properly so that the compiler will accept the changes. Can anyone help with this?