Using Actuate Information Console security : Creating a custom security adapter : Understanding a security adapter class

Understanding a security adapter class

You implement the security adapter by writing a class that extends com.actuate.iportal.security.iPortalSecurityAdapter. This class contains the following methods.

authenticate( )

Syntax

boolean authenticate( javax.servlet.http.HttpServletRequest request )

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 iServer 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 iServer and to access the Encyclopedia 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 iServer 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 iServer 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 iServer and to access the Encyclopedia volume.

Returns

A string containing the user name that the iServer 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 Encyclopedia volume to which the user wishes to connect.

Returns

A string containing the domain and volume name for the Encyclopedia volume to which the user connects to through the iServer. If null, the iServer connects to the default volume, read from the DEFAULT_VOLUME parameter in the Information Console 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 Encyclopedia volume to which the user connects through the iServer.

isEnterprise( )

Syntax

boolean isEnterprise( )

Description

Evaluates whether the user connects to an Encyclopedia volume. The Login module calls isEnterprise( ) to determine whether to use an Encyclopedia volume repository.

Returns

True.


(c) Copyright Actuate Corporation 2011