User Name
Password
AppleNova Forums » Programmer's Nook »

Help passing credentials through/with URL in a browser


Register Members List Calendar Search FAQ Posting Guidelines
Help passing credentials through/with URL in a browser
Thread Tools
turtle
Lord of the Rant.
Formerly turtle2472
 
Join Date: Mar 2005
Location: Upstate South Carolina
 
2022-10-12, 13:46

So I'm doing work for a company that has some interesting measures in place. I need to be able to make REST API calls via a web browser that include basic authentication. I've tried something like
Code:
https://turtle@turtle.com:secretpassword@targetdomain.com/rest/orgUnits
401 Unauthorized. Same for a base64 encoded version of the usernameassword string.
Code:
https://dHVydGxlQHR1cnRsZS5jb206c2VjcmV0cGFzc3dvcmQ=@targetdomain.com/rest/orgUnits
I HAVE to use a browser to do this because I have to authenticate with a primary authentication and then authenticate to the actual application in the target domain.

If my coworker uses Insomnia or PowerShell he can get JSON results using get-credentials and entering his credentials. Because I have to go through the primary authentication this will just never work. I have access via web browser and that is it. No CLI of any flavor.

Is there a plugin for Firefox, Chrome or Edge that can serve to provide the basic auth (adding the proper header to the call) or is there some way I need to format the URL I just don't know?

Here is an example of the code being used by my coworker with Insomnia:
Code:
curl --request GET \ --url 'https://targetdomain.com/rest/orgUnits\ --header 'Authorization: Basic c3RydWxxxxxxxxZW4uY29tOkRxxxxxxxx3JpZ2h0MjIh'
This command does result in a JSON response.

Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.”
Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it.
  quote
turtle
Lord of the Rant.
Formerly turtle2472
 
Join Date: Mar 2005
Location: Upstate South Carolina
 
2022-10-12, 13:49

Grr... turns out I can't install any plugins. I'm working on of a restricted desktop for this project and plugins are blocked.
  quote
turtle
Lord of the Rant.
Formerly turtle2472
 
Join Date: Mar 2005
Location: Upstate South Carolina
 
2022-10-12, 15:47

Never mind. I figured out how I can do it with a specific URL in their org that doesn't do the double layered authentication. Must be done behind VPN.

Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.”
Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it.
  quote
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-10-12, 18:26

::stands helplessly by wishing he could help::



...
  quote
turtle
Lord of the Rant.
Formerly turtle2472
 
Join Date: Mar 2005
Location: Upstate South Carolina
 
2022-10-13, 08:17

It is the thought that counts right?
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
Has your excitement/enthusiasm for this stuff waned since Jobs's passing? psmith2.0 General Discussion 37 2012-02-03 10:58
Xcode passing wrong flags to gcc Banana Programmer's Nook 4 2009-05-23 02:14
Outlook 2007 - finding out SMTP server credentials Partial Genius Bar 1 2009-01-21 04:50
Tragic Passing.... Yontsey AppleOutsider 25 2008-08-21 14:55
PHP : Passing declared variables to REQUIRE'd files. drewprops Genius Bar 9 2005-01-11 00:03


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 13:52.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova