Interface PluginDescriptor<C extends Configuration>

All Known Subinterfaces:
AlarmHandlerPluginDescriptor<C>, ApplicationPluginDescriptor<C>, AuthenticationActionPluginDescriptor<C>, AuthenticatorPluginDescriptor<C>, AuthorizationManagerPluginDescriptor<C>, BackchannelAuthenticatorPluginDescriptor<C>, ClaimsProviderPluginDescriptor<C>, ConsentorPluginDescriptor<C>, DataAccessProviderPluginDescriptor<C>, EmailProviderPluginDescriptor<C>, EventListenerPluginDescriptor<C>, SamlAttributeProviderPluginDescriptor<C>, SigningConsentorPluginDescriptor<C>, SmsPluginDescriptor<C>, TokenProcedurePluginDescriptor<C>

public interface PluginDescriptor<C extends Configuration>
A Plugin descriptor is used to inform the server of the characteristics of a plugin.

The server loads plugin descriptors using Java's ServiceLoader mechanism. However, the server only scans for implementations of specific subtypes of PluginDescriptor, not of PluginDescriptor itself.

This means that this interface should not be implemented directly.

All subtypes of PluginDescriptor scanned by the server can be found in the package se.curity.identityserver.sdk.plugin.descriptor.

An implementation of a PluginDescriptor subtype must be a concrete class with a default constructor.

  • Method Details Link icon

    • getPluginImplementationType Link icon

      String getPluginImplementationType()
      Returns the plugin implementation type. The plugin instance id is used to map to a plugin implementation type.
      Returns:
      The plugin implementation type. Must be unique across all plugins installed in the server.
    • getConfigurationType Link icon

      Class<? extends C> getConfigurationType()
      Returns the configuration interface used by this plugin.

      Only interfaces are allowed. Anything else, like a class or abstract class, will cause the plugin descriptor to be rejected when the server attempts to load it.

      Returns:
      the configuration interface used by this plugin.
    • createManagedObject Link icon

      default Optional<? extends ManagedObject<C>> createManagedObject(C configuration)
      Creates a new ManagedObject for managing the life-cycle of this plugin. Called on configuration changes for instances of this plugin.

      May return an empty Optional, if life-cycle management isn't required for this plugin.

      The default implementation of this method returns an empty Optional.

      Parameters:
      configuration - the updated configuration for the plugin. This configuration object cannot provide service instances, only primitive configuration data. Trying to get a service from this object will cause an error at runtime.
      Returns:
      the optional ManagedObject type for this plugin. This can be used to manage the plugin lifecycle.