| Class Name: | AuthenticatorBean |
| Extends: | Component |
| Implements: | HttpAuthenticator, Externalizable |
Purpose
The Authenticator bean is an invisible JavaBeans component intended for use with the HotJava HTML Component. It allows connections to secure sites and raises a dialog as necessary. Note that this version is a default implementation of the interface, and although it supports http authentication, it does not yet support SSL.Key Properties
noneCreation
AuthenticatorBean()Commonly Used Methods
none
This document describes the HotJava HTML Component. It is intended for both "component assemblers" who will be instantiating and connecting the bean in builder applications as well as Java developers who will be programatically accessing the component. It assumes that you are already familiar with JavaBeans. If terms like property, event, method, introspection, or serialization are unfamiliar, you may want to refer to the JavaBeans documentation or take the JavaBeans tutorial.Table of Contents
The Authenticator bean is an invisible JavaBeans component intended for use with the HotJava HTML Component. The Authenticator bean allows for connections to secure servers by merely adding this component to the same container as the HTML component. Note that this version is a default implementation of the interface, and although it supports http authentication, it does not yet support SSL.IntrospectionThis is about as simple as a bean interface can get. Although is has a few properties, most are read-only and none are bound or constrained. Therefore, the component fires no events.
No BeanInfo class is provided. Introspection relies on low-level reflection to identify the properties and events of the Authenticator bean. All public methods are exposed by default.Example Use
In the beanbox or another JavaBeans-enabled builder application, simply instantiate a HotJava HTML component and Authenticator bean in the same container.
| String | userName | - the current user | (rw) | |
| String | password | - password for authorizing a connection | (w) | |
| int | requestingPort | - the port used by the requestor | (ro) | |
| String | requestingScheme | - the scheme being requested | (ro) | |
| InetAddress | requestingSite | - the internet address of the requesting site | (ro) | |
| URL | requestingURL | - the URL of the requestor | (ro) | |
| Certificate | userCertificate | - SSL: Not yet implemented | (rw) | |
| Certificate[] | siteCertificate | - SSL: Not yet implemented | (ro) | |
| String | requestingPurpose | - SSL: Not yet implemented | (ro) | |
| boolean | trusted | - SSL: Not yet implemented | (ro) |
| instantiation | AuthenticatorBean() |
| accessing properites | getUsername()
setUsername() setPassword() getRequestingSite() getRequestingPort() getRequestingPrompt() getRequestingScheme() getRequestingURL() |
| SSL (not yet implemented) | getUserCertificate()
setUserCertificate() getSiteCertificate() getRequestingPurpose() authorize() isTrusted() |
boolean authorize(Frame frame, boolean lastFailed)
lastFailed is true if the last attempt
to authorize failed. The frame parameter can be used
to present a dialog to the user.
AuthenticatorBean()
int getRequestingPort()
String getRequestingPrompt()
String getRequestingPurpose()
String getRequestingScheme()
InetAddress getRequestingSite()
URL getRequestingURL()
Certificate[] getSiteCertificate()
Certificate getUserCertificate()
setUserCertificate().
String getUsername()
setUsername().
boolean isTrusted(Frame frame)
void setPassword(String pw)
void setUserCertificate(Certificate)
getUserCertificate().
void setUsername(String username)
getUsername().
HotJava Browser Components
HotJava Document Stack Bean
HotJava HTML Component
HotJava System State Bean