Since JReport provides an embedded solution, customer usage scenarios will vary. However, there are two general basic types. Now let's take a look at a detailed example:
Here, there are two WebSphere Servers that have integrated JReport RMI server instances and DHTML JSP and Servlets in the WAR. Outside of the Web Application, there are two JReport Stand-alone servers clustered in two separate machines.

In order to make sure that the customer's end user will not be asked to login twice, they implemented External Authorized interface to return the JReport user ID of the session (if the user logs into their portal). Here's how this interface has been implemented:
|
From the implementation above, you can see that the method getExternalAuthorizedUser() is used to get the authentication information from the request. If it finds the authentication information, it will return the user ID accordingly. If the attribute is not in the session, then NULL will be returned, and JReport will not qualify the request. When NULL is returned, another method handleUnAuthenticatedRequst() is called. In this sample, the method handleUnAuthenticatedRequst() returns a different website, and false is returned to prevent the login dialog to be displayed.
Once the user ID is returned by the External Authorized instance, it will be passed to the Authentication Provider via RMI methods to the remote JReport Enterprise Server instance to check if the User ID is valid or not. Here is the way this authenticator provider interface has been implemented:
|
The above implementation assumes that every user ID is valid, and only the user "admin" is the valid admin user. It works without security problems since the customer's end user will not be able to connect to the stand-alone server directly.