casog
casog
CC#
Created by casog on 3/15/2024 in #help
Ebay's new "RESTFUL" api's seem to have done away with seller JSON responses
It looks like I can't just query my own ebay listings (auctions, buynows). They have some weird scheduled task api that geneerates report files you download? How can I just get inventory and listings/products for sale/auction?
7 replies
CC#
Created by casog on 5/11/2023 in #help
✅ Lagging IOptionsMonitorCache for openidconnnect
[HttpGet]
public async Task AuthenticateClient([FromRoute] int id)
{
var authModel = _authenticationService.GetAuthModel(id);
try
{

var scheme = await _authenticationSchemeProvider.GetSchemeAsync($"oidc-{authModel.ExternalSubsidiaryId}");

var options = new OpenIdConnectOptions();
options = CreateOpenIdConnectOptions(authModel);

_postConfigureOptions.PostConfigure(scheme.Name, options);
_optionsCache.TryRemove(scheme.Name);
_optionsCache.TryAdd(scheme.Name, options);

await HttpContext.ChallengeAsync(scheme.Name);

}
catch (Exception ex)
{
}
}
[HttpGet]
public async Task AuthenticateClient([FromRoute] int id)
{
var authModel = _authenticationService.GetAuthModel(id);
try
{

var scheme = await _authenticationSchemeProvider.GetSchemeAsync($"oidc-{authModel.ExternalSubsidiaryId}");

var options = new OpenIdConnectOptions();
options = CreateOpenIdConnectOptions(authModel);

_postConfigureOptions.PostConfigure(scheme.Name, options);
_optionsCache.TryRemove(scheme.Name);
_optionsCache.TryAdd(scheme.Name, options);

await HttpContext.ChallengeAsync(scheme.Name);

}
catch (Exception ex)
{
}
}
I’m configuring a openidconnect at startup but require a change to the scope based on dynamic runtime clientid for openidconnectoptions scope. When I run this, challengeasync willl redirect to external identity provider for login but with the previous scheme. When I hit back on browser, and authenticate again, the correct clientid is passed. It lags by one. I thought optionsMonitor.tryremove and tryadd before challengeasync would take care of this, but it isn’t. What am I missing?
25 replies
CC#
Created by casog on 11/11/2022 in #help
❔ where generic is itypea or itypeb
Is there syntax to check weather a generic attribute is either of two interface types? Pseudo: Where T : ITypeA or ITypeB
6 replies