WAM Integration - Brokers
Web Account Manager is a Windows 10+ component that is part of the OS. The web account manager enables the use of brokers as a way to do interactive authentication.
https://learn.microsoft.com/en-us/azure/active-directory/develop/scenario-desktop-acquire-token-wam
Languages such as C# use Microsoft.Identity.Client.NativeInterop wich is really just using a C API underneath.
Its also not very clear what they are doing underneath in the C API and/or what is called the MSAL runtime that is needed for brokers because it is INTERNAL to Microsoft. Windows is still closed source despite Microsoft's new found commitment to open source. So this one may not be completley feasible.
The windows crate has web account manager, however, having tried to use this before there were issues that are known that may prevent its use. Research should be done to conclude whether the windows crate in Rust can be used to do this.
There is also the possiblity of using IntPtr and the dll method described in the above article. IntPtr I beleive is just a specifc sized int and i32 should work fine? Thats confusing but if not there are IntPtr types available to use from the Rust crate winapi or it may be possible that the windows crate has this as well.
Other references:
- https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/main/src/client/Microsoft.Identity.Client/Platforms/Features/RuntimeBroker/RuntimeBroker.cs
C++ example using WAM:
- https://github.com/microsoft/cpprestsdk/blob/master/Release/samples/OAuth2Live/MainPage.xaml.cpp#L88
簡単なマニュアルは、ぼくがどこかの時点で作るような気がする。画像付きとはいかないかもしれないけど。
関連して、現在のブロックのフライアウトメニューの項目や中身を一度、整理したい。
たしかにです。 たとえば、今「Function」というカテゴリにmatchブロックがいますが(https://github.com/harukamm/ocaml-blockly/blob/master/demos/typed/dev.html#L75)、これは違うだろうなぁという気がしていました。笑
あとは、必要かどうかわからないのですが、各ブロックにカーソルを合わせたときに出現するツールチップにブロックの機能の説明を書くとかもあるといいのかなと思いました。 今は一部のブロックにしか書けていないです。例えば、sndブロックだとこんな感じです。→https://github.com/harukamm/ocaml-blockly/blob/master/blocks/typed_blocks.js#L674