Fix nullable warnings.#362
Conversation
|
|
||
| string parameterString = string.Join(", ", parameters.Select(p => $"{p.Key}=\"{p.Value}\"")); | ||
|
|
||
| if (CurrentHttpContext == null) |
There was a problem hiding this comment.
I don't think we want to do this, as for blazor, this will be null.
There was a problem hiding this comment.
Good point. Suggestions? Without context, this method's kind of pointless. Will need a workaround for Blazor then, right?
There was a problem hiding this comment.
that's what we've been working on.
There was a problem hiding this comment.
We now have a work around for Blazor, @pmaytak
See Managing incremental consent and conditional access
jmprieur
left a comment
There was a problem hiding this comment.
A couple of questions (and let's not throw if HttpContext is null in TokenAcquisition as it's a valid scenario now, and there is a work around for Blazor)
| }); | ||
| services.AddScoped<IMsalTokenCacheProvider, MsalSessionTokenCacheProvider>(); | ||
| services.TryAddScoped(provider => provider.GetService<IHttpContextAccessor>().HttpContext.Session); | ||
| services.TryAddScoped(provider => |
There was a problem hiding this comment.
This won't work with Graph which is a singleton. Is there a possible mitigation?
There was a problem hiding this comment.
Because session token caches are added with scoped lifetime, they should not be used when
TokenAcquisitionis also used as a singleton (for example, when using Microsoft Graph SDK).
I added the above note to each method and to the Token cache serialization wiki.
In this method, I don't think we can reliably predict which services are added, since they can be modified in any order.
Maybe if ServiceProvider has some sort of validator or event that we can plug into, we could validate at that time.
|
|
||
| string parameterString = string.Join(", ", parameters.Select(p => $"{p.Key}=\"{p.Value}\"")); | ||
|
|
||
| if (CurrentHttpContext == null) |
There was a problem hiding this comment.
We now have a work around for Blazor, @pmaytak
See Managing incremental consent and conditional access
db6c150 to
2d405a6
Compare
2d405a6 to
cbf790c
Compare
* Fix nullable warnings. (#362) * fix userflow claims in addAccounToCacheFromAuthCode (#388) * make aadIssuerValidator public (#385) * Fixes Azure DevOps issue 1097354 (#387) Co-authored-by: pmaytak <34331512+pmaytak@users.noreply.github.com> Co-authored-by: jennyf19 <jeferrie@microsoft.com>
* initial commit to improve obo * add test & experiment w/renaming a few private methods * Jennyf/merge from master (#390) * Fix nullable warnings. (#362) * fix userflow claims in addAccounToCacheFromAuthCode (#388) * make aadIssuerValidator public (#385) * Fixes Azure DevOps issue 1097354 (#387) Co-authored-by: pmaytak <34331512+pmaytak@users.noreply.github.com> Co-authored-by: jennyf19 <jeferrie@microsoft.com> * pr feedback Co-authored-by: Jean-Marc Prieur <jmprieur@microsoft.com> Co-authored-by: pmaytak <34331512+pmaytak@users.noreply.github.com>
No description provided.