REST API Authentication #20
The proposal is to provide the ability to generate and use JSON Web tokens
A new cmdlet could be defined to grant tokens. These tokens could then be used via the bearer header in HTTP requests to the REST API.
To configure authentication, a New-UDAuthenticationMethod could be specified on New-UDRestApi. For tokens generated by UD, you could specify the certificate and allow UD to decrypt and process the tokens.
UD would also be able to be configured to validate tokens against a third-party service that provided the JWTs.
Then in order to use the key, you can just include it with the HTTP request via Invoke-RestMethod headers.