Java Doc for AuthorizationHandler.java in  » Net » SkunkDAV » HTTPClient » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » SkunkDAV » HTTPClient 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


HTTPClient.AuthorizationHandler

All known Subclasses:   HTTPClient.DefaultAuthHandler,
AuthorizationHandler
public interface AuthorizationHandler (Code)
This is the interface that an Authorization handler must implement. You can implement your own auth handler to add support for auth schemes other than the ones handled by the default handler, to use a different UI for soliciting usernames and passwords, or for using an altogether different way of getting the necessary auth info.
See Also:   AuthorizationInfo.setAuthHandler(HTTPClient.AuthorizationHandler)
version:
   0.3-2 18/06/1999
author:
   Ronald Tschalär




Method Summary
 AuthorizationInfofixupAuthInfo(AuthorizationInfo info, RoRequest req, AuthorizationInfo challenge, RoResponse resp)
     This method is called whenever auth info is chosen from the list of known info in the AuthorizationInfo class to be sent with a request. This happens when either auth info is being preemptively sent or if a 401 response is retrieved and a matching info is found in the list of known info.
 AuthorizationInfogetAuthorization(AuthorizationInfo challenge, RoRequest req, RoResponse resp)
     This method is called whenever a 401 or 407 response is received and no candidate info is found in the list of known auth info.
 voidhandleAuthHeaders(Response resp, RoRequest req, AuthorizationInfo prev, AuthorizationInfo prxy)
     Sometimes even non-401 responses will contain headers pertaining to authorization (such as the "Authentication-Info" header).
 voidhandleAuthTrailers(Response resp, RoRequest req, AuthorizationInfo prev, AuthorizationInfo prxy)
     This method is similar to handleAuthHeaders except that it is called if any headers in the trailer were sent.



Method Detail
fixupAuthInfo
AuthorizationInfo fixupAuthInfo(AuthorizationInfo info, RoRequest req, AuthorizationInfo challenge, RoResponse resp) throws AuthSchemeNotImplException(Code)
This method is called whenever auth info is chosen from the list of known info in the AuthorizationInfo class to be sent with a request. This happens when either auth info is being preemptively sent or if a 401 response is retrieved and a matching info is found in the list of known info. The intent of this method is to allow the handler to fix up the info being sent based on the actual request (e.g. in digest authentication the digest-uri, nonce and response-digest usually need to be recalculated).
Parameters:
  info - the authorization info retrieved from the list ofknown info.
Parameters:
  req - the request this info is targeted for.
Parameters:
  challenge - the authorization challenge received from the serverif this is in response to a 401, or null if we arepreemptively sending the info.
Parameters:
  resp - the full 401 response received, or null if we arepreemptively sending the info. the authorization info to be sent with the request, or nullif none is to be sent.
exception:
  AuthSchemeNotImplException - if the authorization schemein the info cannot be handled.



getAuthorization
AuthorizationInfo getAuthorization(AuthorizationInfo challenge, RoRequest req, RoResponse resp) throws AuthSchemeNotImplException(Code)
This method is called whenever a 401 or 407 response is received and no candidate info is found in the list of known auth info. Usually this method will query the user for the necessary info.

If the returned info is not null it will be added to the list of known info. If the info is valid for more than one (host, port, realm, scheme) tuple then this method must add the corresponding auth infos itself.

This method must check req.allow_ui and only attempt user interaction if it's true.
Parameters:
  challenge - the parsed challenge from the server; the host,port, scheme, realm and params are set to thevalues given by the server in the challenge.
Parameters:
  req - the request which provoked this response.
Parameters:
  resp - the full response. the authorization info to use when retrying the request,or null if the request is not to be retried. The necessaryinfo includes the host, port, scheme and realm as given inthe challenge parameter, plus either the basiccookie or any necessary params.
exception:
  AuthSchemeNotImplException - if the authorization schemein the challenge cannot be handled.




handleAuthHeaders
void handleAuthHeaders(Response resp, RoRequest req, AuthorizationInfo prev, AuthorizationInfo prxy) throws IOException(Code)
Sometimes even non-401 responses will contain headers pertaining to authorization (such as the "Authentication-Info" header). Therefore this method is invoked for each response received, even if it is not a 401 or 407 response. In case of a 401 or 407 response the methods fixupAuthInfo() and getAuthorization() are invoked after this method.
Parameters:
  resp - the full Response
Parameters:
  req - the Request which provoked this response
Parameters:
  prev - the previous auth info sent, or null if none was sent
Parameters:
  prxy - the previous proxy auth info sent, or null if none was sent
exception:
  IOException - if an exception occurs during the reading ofthe headers.



handleAuthTrailers
void handleAuthTrailers(Response resp, RoRequest req, AuthorizationInfo prev, AuthorizationInfo prxy) throws IOException(Code)
This method is similar to handleAuthHeaders except that it is called if any headers in the trailer were sent. This also implies that it is invoked after any fixupAuthInfo() or getAuthorization() invocation.
Parameters:
  resp - the full Response
Parameters:
  req - the Request which provoked this response
Parameters:
  prev - the previous auth info sent, or null if none was sent
Parameters:
  prxy - the previous proxy auth info sent, or null if none was sent
exception:
  IOException - if an exception occurs during the reading ofthe trailers.
See Also:   AuthorizationHandler.handleAuthHeaders(RoResponse,RoRequest,AuthorizationInfo,AuthorizationInfo)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.