Add Pop support to wwwAuthenticateParameters#3436
Conversation
refactoring www auth api
Clean Up
Adding tests
|
next iteration will change |
bgavrilMS
left a comment
There was a problem hiding this comment.
- "token68" completely throws your parser off
- WWWAuth and AuthInfo parsers behave differently when the header is not there
- POPNonce is a bad name for a generic param
- Exceptions are not specific enough.
Have you considered abandoning the custom parsing logic you have and adopting the MSAL C++ parser instead?
Co-authored-by: Bogdan Gavril <bogavril@microsoft.com>
Refactoring.
|
On the public API, let's follow the Cancellation Token design guidelines from https://devblogs.microsoft.com/premier-developer/recommended-patterns-for-cancellationtoken/ `It’s a good idea to only make your CancellationToken parameters optional in your public API (if you have one) and leave them as required parameters everywhere else. This really helps to ensure that you intentionally propagate your CancellationTokens through all the methods you call (#2 above). But of course remember to switch to passing CancellationToken.None once you pass the point of no cancellation. It’s also a good API pattern to keep your CancellationToken as the last parameter your method accepts. This fits nicely with optional parameters anyway since they have to show up after any required parameters.` So please remove oevrloads without CancellationToken and add default value to CancellationToken , e.g.
|
bgavrilMS
left a comment
There was a problem hiding this comment.
Aproving, but please simplify public API by allowing only methods with default cancellation token (see comment)
Updating error message
…wwwAuthenticatePop # Conflicts: # src/client/Microsoft.Identity.Client/MsalError.cs
Fixes #3026
Changes proposed in this request
Adding POP support to wwwAuthenticateParameters
Revising api to support multiple WWW-Authenticate headers.
Adding support for Authentication-Info headers
Obsolete apis can be replaced with apis in the column on the immediate right except for
CreateFromWwwAuthenticateHeaderValue(string wwwAuthenticateValue)which is completely deprecated. Developers should useCreateFromAuthenticationHeaders(HttpResponseHeaders httpResponseHeaders)instead.Testing
Unit testing
integration testing
API review
Performance impact