microsoft-authentication-library-for-dotnet
microsoft-authentication-library-for-dotnet copied to clipboard
Adding IsProofOfPosessionSupportedByClient api
Fixes # fix for https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/3496
Changes proposed in this request Adding api for IsProofOfPosessionSupportedByClient to be used to determine if the current broker is able to support POP
Testing Unit test
Performance impact N/A
Documentation
- [ ] All relevant documentation is updated.
Spec also mentions to throw an exception with the recommendation to use IsPopSupported method if incorrect usage of WithPop is detected.
Spec also mentions to throw an exception with the recommendation to use IsPopSupported method if incorrect usage of WithPop is detected.
@pmaytak I dont think I see that In the spec. There is something related to that in the appendix for the higher level api but it is not required for the low level api proposed in proposal 2
Spec also mentions to throw an exception with the recommendation to use IsPopSupported method if incorrect usage of WithPop is detected.
@pmaytak I dont think I see that In the spec. There is something related to that in the appendix for the higher level api but it is not required for the low level api proposed in proposal 2
@trwalke Don't exactly remember what I was referring to, but maybe it was the second acceptance test. Currently in WithPop methods we just throw general exception that Pop is not supported. We should update those error messages methods asking developer to use this new API.
Spec also mentions to throw an exception with the recommendation to use IsPopSupported method if incorrect usage of WithPop is detected.
@pmaytak I dont think I see that In the spec. There is something related to that in the appendix for the higher level api but it is not required for the low level api proposed in proposal 2
@trwalke Don't exactly remember what I was referring to, but maybe it was the second acceptance test. Currently in
WithPopmethods we just throw general exception that Pop is not supported. We should update those error messages methods asking developer to use this new API.
@pmaytak OK, makes sense now. Its not necessarily throwing an exception but informing developers to use the new api via documentation and exception error messages.
Did some additional thinking on this and I think there are a few more exceptions that need to be thrown to satisfy the exception tests.
Acceptance tests
- Try to acquire a POP token on Win 11 when broker is enabled. Expect: pop token
- Try to acquire a pop token on Win 11 when broker is not enabled. Expect: error asking developer to use IsProofOfPosessionSupportedByClient, which would return false.
- Try to acquire a pop token on Win 11 when using an {ADFS, B2C} authority. Expect: error as above
- Try to acquire POP token on {Mac, Linux}. Expect: error as above
Specifically, the last 2. I made some updates to reflect that.
@bgavrilMS @pmaytak