Register | Log in | Password |

365 projects | 71 services | 215 websites | 1073 freelancers | 2763 topics | advertise


Purchase JoomlaWatch:
30 day money-back guarantee
Read more...
9 EUR lifetime license
Buy Now

15 EUR lifetime license
Buy Now
(nofollow link from sponsors page)

Login:

22.9%United States United States
15.5%India India
7.3%Russian Federation Russian Federation
6.9%Colombia Colombia
6.1%Germany Germany
5.1%United Kingdom United Kingdom
4.4%Poland Poland
3.4%Netherlands Netherlands
3%France France
2.8%Canada Canada

Today: 1413
Yesterday: 1639
This Week: 4638
Last Week: 10059
This Month: 11337
Total: 34651

Users

Most active users today from total of 71:
matto, rottenberg, Dworczynska, billspo, crony, dontbugmeplease, dwlamb, Adelavigne, eghtedar, manuelflores, Machin, FreeMe, rockiesrider, michmich, infomech, speru, sunconcept, blombo, rtuszyns, Pedropedro
About JoomlaWatch:
JoomlaWatch is popular joomla visitor tracking and live stats component. It provides several features such as spam blocking, goals tracking, charts, nightly email reports, latest visit map, interactive HTML5 traffic flow graph and many other useful functionalities, which will help you to optimize your site.
RSS Feeds:

rss Freelance
rss Projects
rss Forum
rss Resources

Home
Welcome, Guest
Please Login or Register.    Lost Password?

Authentication in JAVA
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Authentication in JAVA
#2307
Authentication in JAVA 2 Years, 1 Month ago Karma: 0
Hello,

I have a big problem. I want to use java to authenticate on secured websites. I took Yahoo Answers Website as an example. I made the post request, but , instead of redirecting me to the page it supposes to , it redirects me to a page saying my browser rejected cookies. I'm setting user-agent as IE 7.0, and in my IE browser, I set to accept all cookies.


Please help, I need your help ASAP!


Thank you very much,


Octavian<br><br>Post edited by: tavy88, at: 2009/12/26 05:36
tavy88 (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2308
Re:Authentication in JAVA 2 Years, 1 Month ago Karma: 24
Hi tavy88,
your post is quite confusing. You said you want to authenticate using java, and then you write you are using internet explorer. If you meant it the way that you have a program in java which creates this POST request, and has a user-agent set to internet explorer, then yes, the server may refuse you because your simple java client isn\\\'t really accepting the cookies.

Why don\'t you try to use libraries like httpunit, h ttp://httpunit.sourceforge.net/ or HTTPClient : h ttp://www.innovation.ch/java/HTTPClient/ which should also support HTTPS.

Cheers, Matto<br><br>Post edited by: matto, at: 2009/12/26 16:28
matto (Admin)
Moderator
Posts: 707
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2310
Re:Authentication in JAVA 2 Years, 1 Month ago Karma: 0
Hello, Sir


Yes, I use HttpClient classes and yes I set the user-agent to IE. I thought if I set security in the IE browser, it may help.It didn't. I also printed out the headers of my server response, and I see there the cookies ok, but, the &quot;Location:&quot;, if I copy and paste in a browser, it takes me to a page saying : &quot;Your browser rejected your cookies and refuses to sign in&quot;.


Please, can you help me?


Regards,

Octavian
tavy88 (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2315
Re:Authentication in JAVA 2 Years, 1 Month ago Karma: 24
I'm not that much familiar with this set of classes, but it seems that there is a separate module for handling the cookies:

h ttp://www.innovation.ch/java/HTTPClient/advanced_info.html
(section CookieModule)

Cite:

&quot;This module implements cookies as defined by Netscape's cookie spec and the latest HTTP State Management Mechanism spec. During response processing it intercepts and parses the Set-Cookie and Set-Cookie2 header fields (removing them from the response in the process), and during request processing it adds all eligible cookies to the requests.

Because of privacy issues surrounding cookies, whenever the server tries to set a cookie a policy handler is invoked to see whether this cookie should be accepted. The default handler brings up a popup describing the cookie and allowing the user to accept or reject it; the user may also summarily accept or reject cookies from whole domains. You may substitute your own policy handler using the setCookiePolicyHandler() method. If you set the handler to null then all cookies will be silently accepted. If you do not want any cookies to be accepted then either remove the CookieModule from the list of modules or set your own handler which always returns false. The handler must implement the CookiePolicyHandler interface. &quot;


So it means that you probably have to use the setCookiePolicyHandler(null) so all cookies will be accepted. Later you should probably write your own handler.
matto (Admin)
Moderator
Posts: 707
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2316
Re:Authentication in JAVA 2 Years, 1 Month ago Karma: 0
Yes I know that, and I tried it but with no luck. I also looked at your HttpUnit classes, and from FAQ I see they have big problem with ssl communication, so I guess it won't help me either.

What can I do? Can't Java handle this tiny thing? I hear C# has a class too that does it all. Is Java weaker than C#? Please need an urgent solution in Java.
tavy88 (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2317
Re:Authentication in JAVA 2 Years, 1 Month ago Karma: 24
I don't think it's because Java is weak or something. This is a problem which is quite common and you just need to find out why it doesn't work in your case.

Regarding HttpClient (not HttpUnit), I see there is a support for SSL:
h ttp://hc.apache.org/httpclient-3.x/sslguide.html

so there should be no problem with it at all. Maybe posting your code would help.
matto (Admin)
Moderator
Posts: 707
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2318
Re:Authentication in JAVA 2 Years, 1 Month ago Karma: 24
You can also try to run the code from the section Troubleshooting on the mentioned page:

Troubleshooting
The application below can be used as an ultimate test that can reliably tell if SSL configured properly, as it relies on a plain socket in order to communicate with the target server. If an exception is thrown when executing this code, SSL is not correctly installed and configured. Please refer to Sun's official resources for support or additional details on JSSE configuration.
matto (Admin)
Moderator
Posts: 707
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2321
Re:Authentication in JAVA 2 Years, 1 Month ago Karma: 0
Can I send it to your e-mail. I can't post it here due to the rules against links.
tavy88 (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2644
Re:Authentication in JAVA 1 Year, 8 Months ago Karma: 0
Hi thanks for that information that's helpful!!!!
orangewine6 (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#3339
Re:Authentication in JAVA 2 Months, 2 Weeks ago Karma: 0
how can i get orders or bids so that i work on them
JUSTICEGUYA (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1

no license? questions?

Recommended: (advertise)
Joomlawatch 1.2.17 Demo (PRO: 9/15 EUR)
Download Joomlawatch 1.2.17 (PRO: 9/15 EUR)



Rate this extension ...


Stay in touch:

New online JoomlaWatch demo available here: (link)
12 hours ago from web

New comprehensive article on JoomlaWatch goals: (link)
2 days ago from web

JoomlaWatch is now available for Drupal as unlocked BETA version for testing: (link)
3 days ago from web

New article about JoomlaWatch Live Stats feature: (link)
5 days ago from web

Tested versions 1.2.12 FREE, 1.2.17 PRO, 1.2.18 BETA on Joomla 2.5 and older Joomla 1.5 - confirmed to work on both Joomla versions
2 weeks ago from web

Small installer fixes - added JoomlaWatch compatibility with Joomla 2.5
2 weeks ago from web

New article on JoomlaWatch Traffic Flow feature: (link) ... All features of JoomlaWatch will be documented this way.
2 weeks ago from web

Another minor fixes for version 1.2.17 and 1.2.18, added functionality to display only changed values in SEO report - important keyprases
2 weeks ago from web

Minor fixes for JoomlaWatch version 1.2.17 (language files), you can find the latest package in customer zone ((link)
3 weeks ago from web

If you'd like to help with testing of the latest 1.2.18 BETA with new features (Joomla/Wordpress),please add me on skype: matto3c.Thank you!

New article on JoomlaWatch SEO (Search Engine Optimization) report functionality - (link)

JoomlaWatch 1.2.18 is out now! Features new click heatmap feature, SEO report - how people find you on google, and many other improvements

Reorganized the menu items. Now you'll be able to easily find most requested links

JoomlaWatch 1.2.18 BETA now ready! Main features: - Heatmap integration - SEO reports - Anti-spam section visualization (link)

Fixed one issue: no unique visits recorded; PHP $_SERVER['REMOTE_ADDR'] doesn't always return remote IP address! using HTTP_X_FORWARDED_FOR

Christmas Special - 19% OFF from all licenses until 25th of December 2011

JoomlaWatch Heatmap functionality nearly done. Works with all client resolutions. Will be available in next version. (link)

Simple customer zone - (link) is now ready. Users who purchased the PRO version can now download newest version from there.

Because of the problems with payments and forwarding. We are using (link) service to deliver you the files after purchase.

Tracking Expenses from SMS android application is now published on android market :) and it's completely free !



Partners:
Freelance ColdFusion, Flex, PHP

Olejomalby, abstraktne obrazy

Camping Europe

WinAsm Studio

Vyšné Ružbachy

Sochy, Reštaurovanie

R.E.M.

Valid XHTML 1.0 Transitional

RSS feed:

Statistics:
Search Engine Genie Promotion Widget
Privacy policy | Advertise | Donate

Locations of visitors to this page


©2003-2010 Codegravity.com