473,657 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to HTTPS with authentication and extra properties?

The following PERL code snipet request
(automated client request, OR, it can be JUST A PLAIN BROWSER REQUEST)
needs to be converted to Java2-1.3:

$urlreq="https://myname:my*****@ www.farm.com/apps/animalsX?DOG=bo xer&COLOR=brown "
$ua->agent("Mozil la/3.0");
my $request = new HTTPS::Request( 'GET', $urlreq);
$request->content_type(' application/x-www-form-urlencoded');
..
.. (collect data and save it).
..

Anyone have a snipet sample, in Java, of how I do this?

HTTPS seems makes things a bit more complicated in Java.

Is there just as easy a way in a Java client
(by putting name/passwd and property data in with URL) or
how would I submit the URL connection by creating individual
properties?

A bit lost and cornfused . . .
TIA,
Carl

Jul 17 '05 #1
2 3952
Will pay $$$ for help. Anyone?
Carl
--------------------------------------------------------------------------------------------

On Thu, 09 Oct 2003 11:58:54 -0500, carl <ch****@swbell. net> wrote:
The following PERL code snipet request
(automated client request, OR, it can be JUST A PLAIN BROWSER REQUEST)
needs to be converted to Java2-1.3:

$urlreq="https ://myname:my*****@ www.farm.com/apps/animalsX?DOG=bo xer&COLOR=brown "
$ua->agent("Mozil la/3.0");
my $request = new HTTPS::Request( 'GET', $urlreq);
$request->content_type(' application/x-www-form-urlencoded');
.
. (collect data and save it).
.

Anyone have a snipet sample, in Java, of how I do this?

HTTPS seems makes things a bit more complicated in Java.

Is there just as easy a way in a Java client
(by putting name/passwd and property data in with URL) or
how would I submit the URL connection by creating individual
properties?

A bit lost and cornfused . . .
TIA,
Carl

Jul 17 '05 #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

carl wrote:
Anyone have a snipet sample, in Java, of how I do this?

HTTPS seems makes things a bit more complicated in Java.

Is there just as easy a way in a Java client
(by putting name/passwd and property data in with URL) or
how would I submit the URL connection by creating individual
properties?

A bit lost and cornfused . . .
TIA,
Carl


Hi,
I don't actually have code to do this, but I would create a
java.net.URL object for the URL (without username/password). I would
then use the openConnection( ) method, which should return an instance
of javax.net.Https URLConnection in this case. I would use
setRequestPrope rty(), which is inherited from
java.net.HttpUR LConnection(), to set the appropriate header fields
(username and password would be part of this, you'd have to look up
the specs for exactly HOW to do it). Finally, call connect() and
getInputStream( ), and do whatever you need.

- --
Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/kDHVwxczzJRavJY RAglwAJ0WgFcRt8 Q7A2B5W1w8d4cnu TUuyACeKxaN
ZBFZZK4KCoVpBm2 5D3Hj+rw=
=OUFF
-----END PGP SIGNATURE-----
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1988
by: Cpt. Zeep | last post by:
On my current project i have requirement to do HTTPS user authentication. 'Till now i 've been doing authentication using sessions and checking login and pass against MySql. Can you give me some info on authenticating users via HTTPS, what are the requirements, can i use my existing scripts etc. Many Thanx! -- Relaxen und watch das blinkenlights...
9
2612
by: Troot | last post by:
Hi all, In mind this is a daft question, but here goes. My hosts allow secure https logins on specific directories. What I want to do is have a login screen in flash, if the user enters the correct username and password I would like to set the HTTPS username and password using php/flash and then open the secure page. In my mind at this point they'll be logged in and then can navigate the
0
1714
by: A Fan | last post by:
The following PERL code snipet request (automated client request, OR, it can be JUST A PLAIN BROWSER REQUEST) needs to be converted to Java2-1.3: $urlreq="https://myname:mypaswd@www.farm.com/apps/animalsX?DOG=boxer&COLOR=brown" $ua->agent("Mozilla/3.0"); my $request = new HTTPS::Request('GET', $urlreq); $request->content_type('application/x-www-form-urlencoded'); .. .. (collect data and save it).
4
5181
by: Gary Feldman | last post by:
I think I've found a deficiency in the design of urllib related to https. In order to complete an https connection, it appears that URLOpener and hence FancyURLOpener require the key and cert files. Or at least, it's not clear from the description of socket.ssl what it does if they're omitted. However, urlopen has no way to specify such things. Nor should it - for typical uses, a person simply trying to retrieve data from an ssl site...
14
2497
by: Peter Chant | last post by:
I'm currently authenticating a site I have built using basic http authentication built into apache. This has zero overhead on php which is a bonus but it seems to not quite work how I'd like. Are the username and password in the login box that comes up encrypted? When I login https://mysite.local:portnum I get the login dialog. As I am using a self signed certificate I see the dialog stating warning me about it first before the login...
2
4705
by: lucd | last post by:
Hello, I am currently playing with form authentication & role based security on a web application. As seen in the starter kit Time tracker, I setup a custom identity class (CustomPrincipal) because i wanted some extra info about the current user, i need this extra information to be available in pages without having
7
1847
by: Masahiro Ito | last post by:
I need to be login to several websites and download files that are https connections. I just tried IPWorks demo, but it does not seem to offer https. Does anyone know an https capable product, or a way I can do this myself? Thank you. Masahiro
14
3046
by: david | last post by:
I have developed web forms including login by using ASP.NET via HTTP. Now I want to secure the connection from client to the server via HTTPS. How can I configure the server or something else to make the change? Thank you David
2
8158
by: =?Utf-8?B?TGVuc3Rlcg==?= | last post by:
A C# (.NET 2) application which uses the System.Net.HttpWebRequest object to request a resource over HTTPS is failing following the installation of a new proxy server on our internal network with 407 Proxy Authentication Required. The same request through the old proxy succeeds. The same request to an HTTP address through the new proxy succeeds. Also, the request succeeds when forced to use Basic authentication but fails on NTLM.
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.