Class ExternalLoginModule

  • All Implemented Interfaces:
    LoginModule

    public class ExternalLoginModule
    extends org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
    ExternalLoginModule implements a LoginModule that uses an ExternalIdentityProvider for authentication.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String PARAM_IDP_NAME
      Name of the parameter that configures the name of the external identity provider.
      static String PARAM_SYNC_HANDLER_NAME
      Name of the parameter that configures the name of the synchronization handler.
      • Fields inherited from class org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule

        callbackHandler, options, SHARED_KEY_ATTRIBUTES, SHARED_KEY_CREDENTIALS, SHARED_KEY_LOGIN_NAME, SHARED_KEY_PRE_AUTH_LOGIN, sharedState, subject
    • Constructor Summary

      Constructors 
      Constructor Description
      ExternalLoginModule()
      Default constructor for the OSGIi LoginModuleFactory case and the default non-OSGi JAAS case.
      ExternalLoginModule​(org.apache.jackrabbit.oak.spi.security.ConfigurationParameters osgiConfig)
      Creates a new ExternalLoginModule with the given OSGi config.
    • Field Detail

      • PARAM_IDP_NAME

        public static final String PARAM_IDP_NAME
        Name of the parameter that configures the name of the external identity provider.
        See Also:
        Constant Field Values
      • PARAM_SYNC_HANDLER_NAME

        public static final String PARAM_SYNC_HANDLER_NAME
        Name of the parameter that configures the name of the synchronization handler.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExternalLoginModule

        public ExternalLoginModule()
        Default constructor for the OSGIi LoginModuleFactory case and the default non-OSGi JAAS case.
      • ExternalLoginModule

        public ExternalLoginModule​(org.apache.jackrabbit.oak.spi.security.ConfigurationParameters osgiConfig)
        Creates a new ExternalLoginModule with the given OSGi config.
        Parameters:
        osgiConfig - the config
    • Method Detail

      • initialize

        public void initialize​(Subject subject,
                               CallbackHandler callbackHandler,
                               Map<String,​?> sharedState,
                               Map<String,​?> opts)
        Specified by:
        initialize in interface LoginModule
        Overrides:
        initialize in class org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
      • commit

        public boolean commit()
      • abort

        public boolean abort()
        Specified by:
        abort in interface LoginModule
        Overrides:
        abort in class org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
      • logout

        public boolean logout()
                       throws LoginException
        Specified by:
        logout in interface LoginModule
        Overrides:
        logout in class org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
        Throws:
        LoginException
      • clearState

        protected void clearState()
        Overrides:
        clearState in class org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
      • getSupportedCredentials

        @NotNull
        protected @NotNull Set<Class> getSupportedCredentials()
        Specified by:
        getSupportedCredentials in class org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
        Returns:
        the set of credentials classes as exposed by the configured CredentialsSupport implementation.
      • setSyncManager

        public void setSyncManager​(@NotNull
                                   @NotNull SyncManager syncManager)