Allow support of Grant Type "Client Credentials"
Problem this snippet solves: The OAuth 2.0 framework specifies several grant types for different use cases (for more information about grant type: https://oauth.net/2/grant-types/).
The "Client Cr...
Updated Jun 06, 2023
Version 2.0youssef1
Cumulonimbus
Joined January 03, 2012
Roger_245191
Mar 01, 2019Nimbostratus
I think there is a mistake with this part of the irule:
HTTP::payload replace 0 0 [string map {"grant_type=client_credentials" "grant_type=password&username=test&password=jhgkhlkjhkjhkj"} $payload]
It should actually be something like this:
HTTP::payload replace 0 [HTTP::payload length] [string map {"grant_type=client_credentials" "grant_type=password&username=test&password=jhgkhlkjhkjhkj"} $payload]
This is important because if grant_type isn't the first argument in the call, it simply won't work.