Using the security adapter class
To implement a custom security adapter, create a class that extends com.actuate.iportal.security.iPortalSecurityAdapter. This class contains the following methods.
authenticate( )
Syntax
boolean authenticate( javax.servlet.http.HttpServletRequest request )
Parameter
request
The request parameter sent from the iHub Information Console client web application.
Description
Required method that evaluates the current user’s security credentials. The Login module calls authenticate( ) to validate the current user’s security credentials. If authenticate( ) returns False, the user is redirected to the login page.
Returns
True for successful credential evaluation and False otherwise.
Throws
An AuthenticationException indicating the reason for the failure, if credential evaluation is not successful.
getExtendedCredentials( )
Syntax
byte[ ] getExtendedCredentials( )
Description
Retrieves the current user’s extended security credentials.
Returns
A byte array representing any extended credentials for the iHub to use to authenticate the user, or null if there are no extended credentials to evaluate.
getPassword( )
Syntax
String getPassword( )
Description
Required method that retrieves the current user’s password. The Login module calls getPassword( ) and uses the password to establish a connection to the iHub and to access the volume.
Returns
A string that is the password to use to establish the connection.
getRepositoryType( )
Syntax
String getServerUrl( )
Description
Retrieves the repository type. The Login module calls this method to check the repository type. Alternatively, provide isEnterprise().
Returns
A string that indicates the repository type. The repository type for iHub is enterprise.
getRunAsUser( )
Syntax
String getRunAsUser( )
Description
Retrieves the runAs setting if the runAs is enabled. The Login module calls this method to retrieve the user name used for a run as operation.
Returns
A string containing the user name that corresponds to the runAs user setting.
getServerUrl( )
Syntax
String getServerUrl( )
Description
Retrieves the URL of the server to which the current user connects. The Login module calls getServerUrl( ).
Returns
A string containing the URL for the iHub currently connected.
getUserHomeFolder( )
Syntax
String getUserHomeFolder( )
Description
Retrieves the current user’s home folder. The Login module calls getUserHomeFolder( ) to access the user’s files.
Returns
A string that is the user’s home folder. It is null if there is no home folder for the user.
getUserName( )
Syntax
String getUserName( )
Description
Required method that retrieves the current user’s login name. The Login module calls getUserName( ) to establish a connection to the iHub and to access the volume.
Returns
A string containing the user name that the iHub recognizes.
getVolume( )
Syntax
String getVolume( )
Description
Retrieves the volume to which the current user connects. The Login module calls getVolume( ) to retrieve the name of the volume to which the user wishes to connect.
Returns
A string containing the domain and volume name for the volume to which the user connects to through the iHub. If null, the iHub connects to the default volume, read from the DEFAULT_VOLUME parameter in the Visualization Platform web.xml file.
getVolumeProfile( )
Syntax
String getVolumeProfile( )
Description
Required method that retrieves the volume profile to which the current user connects. The Login module calls getVolumeProfile( ) to retrieve the name of the volume profile to which the user wishes to connect.
Returns
A string containing the server profile name for the volume to which the user connects through the iHub.
isEnterprise( )
Syntax
boolean isEnterprise( )
Description
Evaluates whether the user connects to a volume. The Login module calls isEnterprise( ) to determine whether to use a volume repository.
Returns
True.