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
getAuthenticator()
andgetAttributes()
.Optionally, the user may also upload one or more files (such as SSL certificates), you can access these via
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 Default Methods Deprecated Methods Modifier and Type Method Description default IPluginFormAuthenticatorRetVal
buildFormAuthClient(IPluginFormAuthenticatorParams<? extends IAuthenticator<? extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>>> params)
Deprecated.since Version 8.0.0 UsebuildGenericAuthClient(IPluginGenericAuthenticatorParams)
instead.default IPluginGenericAuthenticatorRetVal
buildGenericAuthClient(IPluginGenericAuthenticatorParams<? extends IAuthenticator<? extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>>> params)
Method to build a client used to authenticate users for a generic authentication context.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 IGuiIcon
getIcon()
The icon for this authenticator, mainly used on UI pages.default IPluginProfileFilterExtension
getProfileFilterExtension()
Returns an optional extension for the profile attribute filters used inIndirectClientAuthorization
s which may help users in configuring complex user filters instead of configuring the filters using JSON paths of the profile attributes.default Iterable<Class<? extends IPluginAuthenticatorCustomGUIBean>>
getUnmanagedBeans()
This must return a list of backing bean classes that control the user interface and are required by theXHTML Facelet view
.default URL
getXhtmlView()
This method must return the path to the XHTML page for the custom user interface.default boolean
isAuthenticationTargetSupported(String target)
Returns whether or not the given authentication target is supported.-
Methods inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
getDescription, getDescription, getDisplayName, getName, initialize, initPlugin, install, shutdown, shutdown, uninstall, validateConfigurationData
-
-
-
-
Method Detail
-
buildGenericAuthClient
default IPluginGenericAuthenticatorRetVal buildGenericAuthClient(IPluginGenericAuthenticatorParams<? extends IAuthenticator<? extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>>> params)
Method to build a client used to authenticate users for a generic authentication context.- Parameters:
params
- The parameters to create a client.- Returns:
- the created client wrapped in a
IPluginFormAuthenticatorRetVal
instance - Since:
- 8.0.0
-
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
-
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.
-
getProfileFilterExtension
default IPluginProfileFilterExtension getProfileFilterExtension()
Returns an optional extension for the profile attribute filters used inIndirectClientAuthorization
s which may help users in configuring complex user filters instead of configuring the filters using JSON paths of the profile attributes.- Returns:
- an implementation of the profile filter extension or
null
. - Since:
- 8.0.0
-
isAuthenticationTargetSupported
default boolean isAuthenticationTargetSupported(String target)
Returns whether or not the given authentication target is supported. If this method is not implemented then all authentication targets are supported.- Parameters:
target
- The authentication target to check.- Returns:
true
if the given authentication target is supported andfalse
otherwise.- See Also:
, the pre-defined constant for backend logins
,, the pre-defined constant for form logins
-
getIcon
default IGuiIcon getIcon()
The icon for this authenticator, mainly used on UI pages. The default implementation returns the puzzle piece icon.Note: Due an implementation detail, only
IGuiIcon.getStyleClass()
currently works for the icon on the on the login page.- Returns:
- The icon for this authenticator.
-
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 theXHTML Facelet view
. 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 instantiation will fail.Each bean should be annotated with
Named
. If this annotation is not present or no name is specified, the name defaults to the simple name of the bean class, with the first character changed to lower case.Also, each bean needs to be annotated one of the following scopes:
@RequestScoped
,@ViewScoped
,@SessionScoped
, or@ApplicationScoped
. Note that it depends on the type of plugin which scopes are actually supported (most plugins expect@ViewScoped
beans). In case you do not specify a scope, an appropriate scope will be determined automatically.Please note that the beans are fundamentally unmanaged - functionality specific to managed CDI beans may not be supported, depending on the type of plugin. Certain features of CDI managed beans may be supported partially, depending on the type of plugin, but may work slightly differently. This includes, but is not limited to:
- The exact timing at which
PostConstruct
andPreDestroy
are called may differ. - A field marked with
Inject
may not work with all values allowed by the CDI specification, and may not perform certain validation passes such as the check for circular dependencies. Also, no new bean instances will be created when those beans have not yet been created as part of the current page.
- Specified by:
getUnmanagedBeans
in interfaceIPluginGenericCustomGUI<IPluginAuthenticatorCustomGUIBean>
- Returns:
- A list of unmanaged bean classes required by the Facelet page.
- The exact timing at which
-
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 classpath resources of the plugin. In this case, simply return an URL to 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 Facelet view. Must not return
null
. May returnnull
to indicate that no custom view is available. Whether a custom view is required depends on the type of the plugin.
-
buildFormAuthClient
@Deprecated default IPluginFormAuthenticatorRetVal buildFormAuthClient(IPluginFormAuthenticatorParams<? extends IAuthenticator<? extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>>> params)
Deprecated.since Version 8.0.0 UsebuildGenericAuthClient(IPluginGenericAuthenticatorParams)
instead.IFormAuthContext
should not be necessary on client creation. If web context (request, response, session, etc.) details are required then the returned client should use appropriate resolvers (e.g.CallbackUrlResolver
) which will be given web context information upon evaluation (requests). This method can't create clients that are to be used for authentication targets other thanform authentication
. This method will be ignored ifbuildGenericAuthClient(IPluginGenericAuthenticatorParams)
has been implemented.Method to build a client used to authenticate users for a protected form.- Parameters:
params
- The parameters to create a client.- Returns:
- the created client wrapped in a
IPluginFormAuthenticatorRetVal
instance
-
-