Provide helper methods for performing encryption from per-request auth scripts
Problem
API Security supports a special Python script that is compiled and called prior to sending each request.
This allows users to implement authentication mechanisms that require parts of the request (url, query, header, or body).
Some forms of auth that work this way need to perform encryption operations with algorithms like RSA.
Unfortunately a limitation exists that prevents calling methods with Span<T>
return types or parameters.
As .NET moves it's API to more and more use Span<char>
or Span<byte>
instead of strings or byte arrays,
more of the API becomes uncallable from these Python scripts.
A workaround is needed to enable users to run these methods.
Proposal
In the short term provide helper functions that wrap common encryption calls to enable usage from the scripts.
- Provide JWT capabilities (library)
- Provide RSA wrapper