Interface LoginConfiguration

    • Method Detail

      • registerAuthModuleType

        void registerAuthModuleType​(@NotNull
                                    AuthModuleType authModuleType)
        Registers new authentication module
        Parameters:
        authModuleType - type of the authentication module
        Since:
        8.0
      • getTextForLoginPage

        @Nullable
        String getTextForLoginPage()
        Returns text to show on the login page.
        Returns:
        text to show on the login page.
      • isDefaultLoginConfigured

        boolean isDefaultLoginConfigured()
        Returns true if default login module is configured (authorization via own server database).
        Returns:
        true if default login module is configured (authorization via own server database).
      • isOnlyDefaultLoginConfigured

        boolean isOnlyDefaultLoginConfigured()
        Returns true if default login module is configured (authorization via own server database) and no other login modules are configured.
        Returns:
        true if default login module is configured
        Since:
        8.0
      • isAuthModuleConfigured

        <T extends AuthModuleType> boolean isAuthModuleConfigured​(@NotNull
                                                                  Class<T> clazz)
        Returns true if authentication module with the specified type class is configured.
        Returns:
        true if authentication module with the specified type class is configured
        Since:
        8.0
      • isAtLeastOneAuthModuleConfigured

        boolean isAtLeastOneAuthModuleConfigured​(@NotNull
                                                 Collection<Class<? extends AuthModuleType>> classes)
        Returns true if at least one authentication module with one of the specified type classes is configured.
        Returns:
        true if at least one authentication module with one of the specified type classes is configured
        Since:
        8.0
      • getConfiguredLoginModules

        @NotNull
        List<AuthModule<LoginModuleDescriptor>> getConfiguredLoginModules()
        Returns enabled login modules in the order they are specified in config file. Never returns empty list: if no login modules are configured, returns the list that contains only default login module.
        Returns:
        see above
        Since:
        8.0
      • isGuestLoginAllowed

        boolean isGuestLoginAllowed()
        Returns true if guest login is allowed.
        Returns:
        true if guest login is allowed
      • isRootLoginAllowed

        boolean isRootLoginAllowed()
        Returns true if root login is allowed.
        Returns:
        true if root login is allowed
      • getGuestUsername

        @NotNull
        String getGuestUsername()
        Returns username of the guest user
        Returns:
        username of the guest user
      • isFreeRegistrationAllowed

        boolean isFreeRegistrationAllowed()
        Returns true if free user account registration is allowed. Free registration can be enabled only if default login module selected.
        Returns:
        true if free user account registration is allowed
      • isUsersCanChangeOwnPasswords

        boolean isUsersCanChangeOwnPasswords()
        Returns true if users are allowed to change own passwords for built-in authentication module.
        Returns:
        see above
        Since:
        8.0
      • getRegisteredLoginModules

        @NotNull
        Collection<LoginModuleDescriptor> getRegisteredLoginModules()
        Returns collection of registered login module descriptors.
        Returns:
        collection of registered login module descriptors
      • getRegisteredAuthModuleTypes

        @NotNull
        Collection<AuthModuleType> getRegisteredAuthModuleTypes()
        Returns collection of registered authentication module types.
        Returns:
        collection of registered authentication module types
        Since:
        8.0
      • findAuthModuleTypeByName

        @Nullable
        AuthModuleType findAuthModuleTypeByName​(@NotNull
                                                String authModuleTypeName)
        Returns registered authentication module type with the specified name.
        Returns:
        type or null if not found
        Since:
        8.0
      • createJAASConfiguration

        @NotNull
        Configuration createJAASConfiguration​(@NotNull
                                              AuthModule<LoginModuleDescriptor> loginModuleWithProperties)
        Creates JAAS login configuration for specified login module with properties.
        Returns:
        JAAS login configuration
        Since:
        8.0
      • getConfiguredAuthModules

        @NotNull
        <T extends AuthModuleTypeList<AuthModule<T>> getConfiguredAuthModules​(@Nullable
                                                                                Class<T> baseClass)
        Returns authentication modules configured in config file.
        Parameters:
        baseClass - auth module descriptor base class to filter auth modules or null to return all
        Returns:
        see above
        Since:
        8.0
      • getAuthType

        @Deprecated
        String getAuthType()
        Deprecated.
        since useless
        Always returns "mixed" string.
        Returns:
        see above