Interface IPluginAuthenticatorType
-
- All Superinterfaces:
IFCPlugin
,INamedUiElement
,INameProviding
,IPluginGenericCustomGUI<IPluginAuthenticatorCustomGUIBean>
,ITransferable
,Serializable
public interface IPluginAuthenticatorType extends IFCPlugin, IPluginGenericCustomGUI<IPluginAuthenticatorCustomGUIBean>
Interface for custom authenticator types. The user can select this plugin type when they create new authenticators in the external user menu.Please note that the user may create multiple authenticator of this type. For each created authenticator, the user can configure a list of key-value pairs (such as the username or token needed to perform the authentication). You can access the configuration via
IPluginFormAuthenticatorParams.getAuthenticator()
andIAuthenticator.getAttributes()
.Optionally, the user may also upload one or more files (such as SSL certificates), you can access these via
IAuthenticator.getFileMap()
.- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
-
Fields inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
CONFIG_FILENAME
-
Fields inherited from interface de.xima.fc.interfaces.INamedUiElement
ATTR_DISPLAY_NAME
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IPluginFormAuthenticatorRetVal
buildFormAuthClient(IPluginFormAuthenticatorParams<? extends IAuthenticator<? extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>>> IPluginClientParams)
Method to build an client for the authentication for the request of a protected form.default IPluginAuthenticatorConfigGuiDetails
getConfigGuiDetails(IPluginAuthenticatorConfigGuiDetailsParam params)
Optional.default String
getHtmlHelpSnippet(Locale locale)
This method may optionally return a help text that is displayed when the user creates a new authenticator of this type.default Iterable<Class<? extends IPluginAuthenticatorCustomGUIBean>>
getUnmanagedBeans()
This must return a list of backing bean classes that control the user interface and are required by theIPluginGenericCustomGUI.getXhtmlView()
.default URL
getXhtmlView()
This method must return the path to the XHTML page for the custom user interface.-
Methods inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
getDescription, getDescription, getDisplayName, getName, initialize, initPlugin, install, shutdown, shutdown, uninstall
-
-
-
-
Method Detail
-
buildFormAuthClient
IPluginFormAuthenticatorRetVal buildFormAuthClient(IPluginFormAuthenticatorParams<? extends IAuthenticator<? extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>>> IPluginClientParams)
Method to build an client for the authentication for the request of a protected form.- Parameters:
IPluginClientParams
- the parameters to create an client wrapped in aIPluginFormAuthenticatorParams
instance- Returns:
- the created client wrapped in a
IPluginFormAuthenticatorRetVal
instance
-
getHtmlHelpSnippet
default String getHtmlHelpSnippet(Locale locale)
This method may optionally return a help text that is displayed when the user creates a new authenticator of this type. This must be valid HTML snippet. May be used, for example, to explain which properties the user must enter.- Parameters:
locale
- The locale for which to show the help text.- Returns:
- An HTML snippet with an explanation for the user.
-
getConfigGuiDetails
default IPluginAuthenticatorConfigGuiDetails getConfigGuiDetails(IPluginAuthenticatorConfigGuiDetailsParam params)
Optional. Returns detail information about how the parts of the plugin authenticator config GUI should be rendered- Parameters:
params
- parameters for requesting the custom config dietails- Returns:
- the config GUI details
-
getXhtmlView
default URL getXhtmlView()
Description copied from interface:IPluginGenericCustomGUI
This method must return the path to the XHTML page for the custom user interface. Usually the XHTML file is part of the JAR resources of the plugin. In this case, you should return an URL to a JAR file resource (jar:file:/...
) like so:@Override public URL getXhtmlView() { return getClass().getResource("/path/to/view.xhtml"); }
- Specified by:
getXhtmlView
in interfaceIPluginGenericCustomGUI<IPluginAuthenticatorCustomGUIBean>
- Returns:
- Path to the XHTML view. Must not return
null
. If you do returnnull
, it will be treated as an error.
-
getUnmanagedBeans
default Iterable<Class<? extends IPluginAuthenticatorCustomGUIBean>> getUnmanagedBeans()
Description copied from interface:IPluginGenericCustomGUI
This must return a list of backing bean classes that control the user interface and are required by theIPluginGenericCustomGUI.getXhtmlView()
. A new instance of the bean will be created automatically when the view is opened. Make sure each bean has got a no-argument constructor or it cannot be instantiated.Please note that the beans are unmanaged - functionality specific to managed bean is not available. This means, for example, that annotations such as
PostConstruct
andManagedProperty
are not supported and will not work:- Instead of
PostConstruct
, you can useIPluginGenericCustomGUIBean.initialize(de.xima.fc.interfaces.plugin.lifecycle.IPluginInitializeBeanData)
- Instead of
ManagedProperty
, you can access beans you need via the current FacesContext etc.
Each bean should be annotated with
ManagedBean
and specify aManagedBean.name()
. If this annotation is not present or no name is specified, the name defaults to the simple name of the bean class.Also, each bean needs to be annotated one of the following scopes:
RequestScoped
,ViewScoped
,SessionScoped
orApplicationScoped
. Note that it depends on the type of plugin which scopes are actually supported. In case you do not specify a scope, an appropriate scope will be determined automatically.Certain features of managed beans may be supported partially, depending on the type of plugin, but may work differently. This includes, but is not limited to:
- The exact timing at which
PostConstruct
andPreDestroy
are called may differ. - A
ManagedProperty
may not work with all values allowed by the Java Beans specification, and may not perform checks such as the check for circular dependencies. It will also not create new beans when those beans have not been created yet as part of the current page.
- Specified by:
getUnmanagedBeans
in interfaceIPluginGenericCustomGUI<IPluginAuthenticatorCustomGUIBean>
- Returns:
- An
Iterable
over the unmanaged bean classes required by the view
- Instead of
-
-