Configuration file settings for using OAuth2
Status: Alpha
Brought to you by:
coroberti
From: Tristan W. <mir...@gm...> - 2015-10-28 16:01:22
|
Hi, I am trying to configure the following curl request to get it to work in curl-loader: curl --user CLIENTID:SECRET -k -d "grant_type=password&username=user&password=passwordhere" https://IP#:9443/oauth2/token && echo As I understand it from reading prior discussions on the list, the -k option is already sent. The --user portion is likely via WEB_AUTH_CREDENTIALS in the top section, and it's possible that the -d portion that passes the content type for application/x-www-form-urlencoded (so the -H option isn't needed for that data type) would be MULTIPART_FORM_DATA for the POST section. (Reference the man page for curl for -d or -data to show that is the content type: -d, --data <data> (HTTP) Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded. Compare to -F, --form. ***** As such, I have the following, but it isn't working and returns a 405 error: ERCL 405 HTTP/1.1 405 Method Not Allowed Any help on getting the right configuration settings would be appreciated. I'm pasting my settings below. The CLIENTID, SECRET, user and password are all redacted in the example ########### GENERAL SECTION ################################ BATCH_NAME=oidc CLIENTS_NUM_MAX=2800 CLIENTS_NUM_START=500 CLIENTS_RAMPUP_INC=5 INTERFACE=eth0 NETMASK=255.255.255.0 IP_ADDR_MIN=IP# IP_ADDR_MAX=IP# IP_SHARED_NUM=1 CYCLES_NUM=-1 URLS_NUM=2 ########### URL SECTION #################################### URL=https://IP#:9443/oauth2/token URL_SHORT_NAME="oidc" REQUEST_TYPE=GET WEB_AUTH_CREDENTIALS="CLIENTID:SECRET" TIMER_URL_COMPLETION=0 TIMER_AFTER_URL_SLEEP=0 # POST-part # URL="" URL_SHORT_NAME="Login-POST" URL_USE_CURRENT=1 REQUEST_TYPE=POST MULTIPART_FORM_DATA="grant_type=password" MULTIPART_FORM_DATA="username=user" MULTIPART_FORM_DATA="password=passwordhere" TIMER_URL_COMPLETION=0 TIMER_AFTER_URL_SLEEP=0 Thank you! Tristan J. Wallace |