Authenticating with cURL for server-to-server access #514
-
I have several apps protected using mod_auth_openidc with Okta as an identity provider. I want to programatically grab/extract data from my sites. How can I access my protected sites using cURL? I'm able to get my service account to authenticate into Okta with cURL and grab various tokens from Okta (this is with the Okta /api/v1/authn and /oauth2/v1/authorize end points). My problem is when my script cURLS the 'redirect_uri' back to my site, I can't figure out what to pass through to my app to show mod_auth_openidc that I've signed in. I've tried various attempts at including access tokens in either the header or data body with no success (I've also looked for cookies to set and neither Okta nor my site ever offers one). Any guidance or pointers on what I'm missing is greatly appreciated. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
you'll need to configure mod_auth_openidc in OAuth 2.0 Resource Server mode, see https://github.com/zmartzone/mod_auth_openidc/wiki/OAuth-2.0-Resource-Server |
Beta Was this translation helpful? Give feedback.
you'll need to configure mod_auth_openidc in OAuth 2.0 Resource Server mode, see https://github.com/zmartzone/mod_auth_openidc/wiki/OAuth-2.0-Resource-Server