Automated Basic Authenication with an Applet for the Browser

Hi
I like to automate web access to secured pages and proxies, which are
proteced with a Basic Authenication scheme.
The Basic Authentication within an Applet works really well, I get all the
information I need when I attach the
Authorization: Basic base64encodeUID_PW to the request Header.
or
if I use the Authenticator Class of the JDK1.5.
My problem is that the browser do not notice that I already have a
UID/Password combination for the desired web page and I don't want that the Dialog
to enter the UID and Password comes up, when I access the Page later with the browser.
When I did the same with a form based authorisation the URLConnection was
setting the Cookie inside the browser implicitly, the showDocument() method
displayed the secured page, because the browser used the cookie to access
it.
Is there any way to access the cache for the UID and Password of the
browser to set these values, so when I invoke the showDocument() to
display the page inside the browser, I don't have to enter the UID and
Password again?
My current code to authenticate myself is this, I also tried a direct
socket connection and a HttpURLConnection there was no difference:
String urlString =
"http://www.demo.com/basicprotectedpage/index.html"
AppletContext appCont = getAppletContext();
//created password authenticator.
mmAuthenticator myPassAuth = new mmAuthenticator(uid,pw);
//setting password.
Authenticator.setDefault(myPassAuth);
//URL created.
URL url = new URL(urlString);
//opening connection
URLConnection conn = url.openConnection();
//setting do input and do output.
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(true);
//Data Input Stream
BufferedReader bin = new BufferedReader(new
InputStreamReader(conn.getInputStream()));
String inputLine;
System.out.println("web page data " );
while ((inputLine = bin.readLine()) != null)
System.out.println(inputLine);
bin.close();
appCont.showDocument(new URL(urlString)); // this should
display the secured page without the prompt for uid password
Thank you in advance.
Martin

That is properly too late.
However, I am working on a similar problem. This is my insight. If anybody know more than I do, please let me know.
Using the applet, the Authenticator may not work due to the new JRE. I believe if you have the property file within your machine, you may get around this problem. Other than that, I have not figured out a way to get pass this security issue. Anybody have any thought on that ?
To get around this issue, in your case, it is Basic Authentication; so it won't be too bad. You will need to write your own http client. which mean, you will need to be able to read the response from the server and send the proper header back to the server. At least that is how I did it.
The problem I am facing now is doing Digest Authentication. I really hate to do all kind of work to get Digest working. Only if the Authenticator work for me.
Hope that help.

Similar Messages

  • [svn:fx-4.0.0] 14150: revert the rollback of revision# 13951 to have the automation swcs built with current version of the SDK

    Revision: 14150
    Revision: 14150
    Author:   [email protected]
    Date:     2010-02-12 12:36:19 -0800 (Fri, 12 Feb 2010)
    Log Message:
    revert the rollback of revision# 13951 to have the automation swcs built with current version of the SDK
    QE notes: no
    Doc notes: no
    Bugs: FLEXENT-1230
    Reviewer: lauren
    Tests run: checkintests
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FLEXENT-1230
    Modified Paths:
        flex/sdk/branches/4.0.0/frameworks/libs/automation_agent.swc
        flex/sdk/branches/4.0.0/frameworks/libs/qtp.swc
        flex/sdk/branches/4.0.0/frameworks/libs/qtp_air.swc
        flex/sdk/branches/4.0.0/frameworks/locale/da_DK/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/da_DK/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/de_DE/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/de_DE/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/en_US/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/en_US/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/es_ES/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/es_ES/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/fi_FI/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/fi_FI/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/fr_FR/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/fr_FR/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/it_IT/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/it_IT/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/ja_JP/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/ja_JP/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/ko_KR/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/ko_KR/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/nb_NO/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/nb_NO/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/nl_NL/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/nl_NL/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/pt_BR/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/pt_BR/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/ru_RU/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/ru_RU/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/sv_SE/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/sv_SE/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/zh_CN/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/zh_CN/qtp_air_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/zh_tw/automation_agent_rb.swc
        flex/sdk/branches/4.0.0/frameworks/locale/zh_tw/qtp_air_rb.swc
    Removed Paths:
        flex/sdk/branches/4.0.0/frameworks/projects/automation_air/bundles/
        flex/sdk/branches/4.0.0/frameworks/projects/automation_dmv/bundles/
        flex/sdk/branches/4.0.0/frameworks/projects/automation_flashflexkit/bundles/
        flex/sdk/branches/4.0.0/frameworks/projects/automation_spark/bundles/
    Property Changed:
        flex/sdk/branches/4.0.0/

    Credit Tony E
    To downgrade to Firefox 3.6 first uninstall Firefox 4, but do not select the option to "Remove my Firefox personal data". If you select that option it will delete your bookmarks, passwords and other user data. See https://support.mozilla.com/kb/Uninstalling+Firefox
    You can then install the latest version of Firefox 3.6 available from http://www.mozilla.com/en-US/firefox/all-older.html - it will automatically use your current bookmarks, passwords etc.
    To avoid possible problems with downgrading, I recommend going to your profile folder and deleting the following files if they exist - extensions.cache, extensions.rdf, extensions.ini, extensions.sqlite and localstore.rdf. Deleting these files will force Firefox to rebuild the list of installed extensions, checking their compatibility, and reset toolbar customizations.
    For details of how to find your profile folder see https://support.mozilla.com/kb/Profiles

  • Invoice posting with different currency for the same PO

    Hi,
    Can we post the the Invoice with different currencies for the same PO.
    For example.
    PO has Qty 100 pcs.  amount 100 USD
    GR   Qty 100 pcs.
    Is it possible to post Invoice of 50 pc with 50 USD, and 50pcs with some other currency.
    Any sugggestions pls.
    Thanks,
    Satya

    Hello
    As per my knowledge, that is not possible.
    And in whjat scenario, we need to do that?
    In MIRO header itself we have the vendor currency, so it is not posbile to maintain different currency in different line items in MIRO.
    If you want, you can do MIRO in different currency that what is in PO.
    In the example given, you have o post 2 invoices, one for 50 qty in USD and the other 50 in different currency in other invoice transaction by giving the currency in basic data-invoice header and then only press ENTER after giving the PO number.
    Hope this helps
    Regards

  • I have one of the old macbooks and wish to hook it up to my tv. do i need a mini dvi to hdmi adapter plus a 3 rca phono lead with a jack for the sound. please help as im useless at this stuff. cheers

    i have one of the old macbooks and wish to hook it up to my tv. do i need a mini dvi to hdmi adapter plus a 3 rca phono lead with a jack for the sound. please help as im useless at this stuff. cheers

    First we need to know which one of the 9 different models of MacBook you have. To see which model you have go to the Apple in the upper left corner and select About This Mac, then click on More Info (and then System Report if you’re running 10.7 Lion). When System Profiler comes up check the Model Identifier and post it back here.
    The Late 2008 model 5,1 Aluminum Unibody and the Late 2009 model 6,1 and Mid 2010 model 7,1 White Unibody have a Mini DisplayPort. The Early 2006 model 1,1 through Early 2008 model 4,1s plus the Early and Mid 2009 model 5,2s have Mini-DVI ports. Each would take a different adapter to connect with the TV.

  • How do i log in on a macbook air with out wifi for the first time

    How do i log in on a macbook air with out wifi for the first time

    More details needed.
    Otherwise just startup the computer and enter your password.
    New Mac?
    A new Mac comes with 90 days of free tech support from AppleCare.
    AppleCare: 1-800-275-2273
    Call AppleCare.
    Best.

  • Has anyone come up with a solution for the WD Passport and Mavericks OSX issues yet?

    I was wondering if anyone has come up with a solution for the newer Macbook Pro/Mavericks and external WD Passport not mounting problems?
    I have a couple of year old WD Passport that worked fine in my old 2009 Macbook Pro, the problem is the old computer crashed.
    My dilemna; My new 2014 Mackbook Pro will not open my WD Passport, called WD Support, their answer, sorry, nothing has been solved.
    Is there anyway I can get access to my files on the Passport with any other software, or by using a PC.
    I am aware of reformatting the HD, and have read all the forums I could find and have tried installing the WD Update as well, (with the support tech from WD) and nothing works.
    I know that my WD Passport works, so please don't suggest checking it, or the cord.
    I appreciate all the help anyone can offer, and I am with all the rest of you struggling for solutions.
    Thanks so much

    Hi everyone, this is what I did
    1. upgrade disks to the latest firmware
    2. de-install ntfs-3g and MacFuse.
    3. Re-install NTFS 3G  without Macfuse.
    4. Next step: Install OSXFUSE latest version with selection MacFUSE compatibility layer.
    5. Last step: Install Fuse Wait
    Note: between steps 2 and 5, I restarted my machine.
    It worked for me, after about 4 hours.

  • Duplicates.  I use iTunes match.  When I run exact duplicates, I get duplicates that say uploaded for one and uploaded with a cloud for the other.  Which one do I delete?

    Duplicates.  I use iTunes match.  Two questions:
    When I run exact duplicates on the library on my Mac Air, I get duplicates that say uploaded for one and uploaded with a cloud for the other.  Which one do I delete?
    Some of the duplicates say matched and matched with a cloud.  Same question - which one should I delete?

    I'm not sure I understand the question.
    First I would update your iTunes match.  iTunes match will tell you what is duplicates and then you can just delete them from the library. 
    Second, the course in a situation like this is to delete ONE duplicate and see what happens.  Make sure you have that song backed up somewhere just incase it deletes it completely.  But usually I'd delete one and then see if it deletes both or just the one you pressed. 
    Thirdly, update iTunes match.  It usually does a good job of locating actual duplicates.

  • How to calculate with holding tax for the open item

    Dera all,
    Can you tel me how to simulate with holding tax for the open item? i will try do it using FI_WT_F110_CALCULATE FM  but it dosnt work. plz help me
    regard
    nawa

    Hi Sushil,
    can you please elaborate on how you resolved it. we are facing the same issue with BAPI not calculating the withholding tax data.
    Thanks,
    Sanket

  • I did not keep the email with my registration for the free trial so I do not have a serial number as I have no products due to the fact that my trial has expired but I would now like to purchase a product and I cannot skip the serial number request.

    I did not keep the email with my registration for the free trial so I do not have a serial number as I have no products due to the fact that my trial has expired but I would now like to purchase a product and I cannot skip the serial number request in order to buy the product it's so irritating I'm about to just do a different product altogether... anyone know how to get or bypass the serial number request?

    You must first make the purchase, then you will receive the serial number you are asking about.  YOu do not acquire the serial number thru the software.  You acquire it thru the purchase, possibly via a follow-up confirmation  email.

  • Problems with Photoshop cs4 for the Mac

    I am having all kinds of problems with Photoshop CS4 for the Mac.  When I boot the software it seems to work for a while then, I am unable to open upf a file in Photoshop.  I drag a photoshop file over the application icon, the whole screen flickers and nothing happens.  I am unable to quit Photoshop as the quit choice is grayed out and command-q will not make it quit. I have to force quit.  I can repeat this pattern over and over.  What is happening?  How do I solve this problem?
    --Kenoli

    Thanks for the reply.  I am using  Photoshop 11.0.1.  I am using the latest version of Snow Leopard.  I have found both Photoshop and Dreamweaver to be pretty buggy for several versions now.  My suspicions were that they were really engineered for Windows and never really fully implemented for the Mac.  Dreamweaver crashes or hangs on me three or four times a day if I us it all day and does various annoying things like refusing to respond to the delete key after I have used it for a while.  I have pretty much stopped using it to some degree for that reason and also because there is other software that does a lot of coding things I do much more directly and simply.  Also Dreamweaver always seems to struggle to quit when I tell it to quit (that is, it takes a long time and gets hung up at places before it quits) and once it does quit, I always get a message saying that it has unexpectedly quit (even when I have told it to quit).
    The problems with Photoshop  (starting with just taking a long time to load)  have escalated to the point I described today, which makes it almost unusable. I just reinstalled Snow Leopard to see if there was anything buggy in the system software.  I will report if problems go away.
    Regarding both the refusal to open image files and the grayed out quit command, made me think something like you, i.e. there was some dialogue box open somewhere.  However, I couldn't find anything and I don't use two monitors.
    So . . . Adobe just seems to be getting more expensive and more buggy.
    Incidentally, why is it still running in Rosetta rather than natively?  Adobe now has a real Intel processor to work with.
    --Kenoli

  • I have an ut ipad 2 with no configuration for the i cloud. I have follow the instructions of synch the ipad with itunes v 10.6 in my pc, but i can not get the display of the cloud icon in the general settings of the ipad. appreciate any help

    I have an ut ipad 2 with no configuration for the i cloud. I have follow the instructions of synch the ipad with itunes v 10.6 in my pc, but i can not get the display of the cloud icon in the general settings of the ipad. appreciate any help

    I'm asking because ios5 introduced iCloud. You have to have updated to ios5 to see it.

  • I am a newbie to labview but have delt with plc's for the last 10 years. I would like to send and recieve certain integer, floating poin

    t, or binary files through the plc or micrologix communication port. This would allow me to build a front panel and change certain states of bits or retrieve data from certain files to display on the front panel. Please steer me in the right direction...I am a newbie to labview but have delt with plc's for the last 10 years. I would like to send and recieve certain integer, floating point, or binary files through the plc or micrologix communication port. This would allow me to build a front panel and change certain states of bits or retrieve data from certain files to display on the front panel. Please steer me in the right dir
    ection...

    t, or binary files through the plc or micrologix communication port. This would allow me to build a front panel and change certain states of bits or retrieve data from certain files to display on the front panel. Please steer me in the right direction...Another option is to talk to the PLC using Modbus. Several versions of Modbus drivers are available online--or I could send you the ones I use.
    The big thing to look at is exactly what you want to do in the end. If you are going to be able to use all the features of the DSC, by all means go for it. It will save you a lot of time.
    If however, all you want is a remote front panel for the PLC, the DSC might be overkill. Only you can say.
    Look at your entire application and where you can see your work going in the reasonable future.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • I updated to ios 7 2 days ago and I synced with my computer for the first time yesterday. Most of my calendar appts and events were wiped off my phone but are still on the computer. I use outlook 2010 and a pc running windows 7.

    I updated my iphone 5 to  ios 7 two days ago and I synced with my computer for the first time yesterday. Most of my calendar appointments and events were wiped off my phone but are still on the computer. I use outlook 2010 and a pc running windows 7. Rebooting the phone and the computer failed to remedy the calendar sync problem.

    Easy solution for restoring lost calendar informaiton, thank goodness.  On your iPhone, go to settings, then to iCloud.  If your Calendar selection is turned off,  turn it on.  Your info should restore.  If your Calendar selection is turned on, then turn it off.  Choose to save calendars when asked.  After it shuts the Calendar off, turn it back on.  Your info should be restored.
    Thank you to Apple support for walking me through this.  Shame on you Apple for not just telling people about this easy fix rather than making us go through all of this pain and worry.
    - JT

  • HT201272 Is the app Scramble with friends only for the iPhone?   I installed it to my iPad but it keeps freezing up.

    Is the app scramble with friends only for the I phone?   I installed it to my new iPad and it kept freezing up.  I uninstalled it and then installed it again, same thing happens.

    it seems to be crashing for everyone - not only iPad's, but on my iPod Touch 4G, and my brother's brand new iPhone.... Zynga doesn't have any answers either.  They are useless.  The only thing that helped temporarily is when I deleted it from my iPod and reinstalled it. 

  • I Baught A iMac 2010 From Someone it came with lion but for the programs i use i need snow leopard but when trying to install it won't boot from usb or cd what can be the problem i've been at this for over 24 hours if anyone ca help it'd be greatly apprec

    I Baught A iMac 2010 From Someone it came with lion but for the programs i use i need snow leopard but when trying to install it won't boot from usb or cd what can be the problem i've been at this for over 24 hours if anyone ca help it'd be greatly appreciate it! Thanks!

    Downgrade OS X Lion To Snow Leopard [Video How-To]
    http://www.cultofmac.com/110614/downgrade-os-x-lion-to-snow-leopard-video-how-to /
    How To Downgrade OS X Lion To Snow Leopard: The Complete Tutorial
    http://www.redmondpie.com/how-to-downgrade-os-x-lion-to-snow-leopard-the-complet e-tutorial/
    How To Downgrade from Apple OS X Lion to Snow Leopard
    http://www.pcmag.com/article2/0,2817,2389334,00.asp

Maybe you are looking for

  • Mass creation of warehouse products

    We are about to implement our first EWM storage warehouse. In classical WM we used to prepare the material master data in an Excel sheet and used the RMDATIND via LSMW for creation of the warehouse specific data. In EWM however, I found nothing simil

  • Convert filled in PDF form to Word

    I've got a fillable PDF document that I have saved about 10 fields on it. I want to convert it to Word. When I do that, the Word document always shows the blank fields without the information I've filled in. How can I get a Word document that has the

  • Will an american Mac Mini work in the UK?

    My girlfriend is bringing me one home from Georgia, and I suddenly got the fear that it might not work in the UK, can anybody help me?

  • Field selection in SPRO of Relationship tab in Work Order

    Hi, How to make fields visible/invisible of Relationship tab (if there are any other than the visible ones as default). The tab is seen upon clicking of General button in Operations tab of Work Order iw31. Thanks Faisal

  • I need to trim out the second word of a string

    If the string is as follows I need to always return the second word: This is an example. (I need to return 'is') Another example string. (I need to return 'example')