Interface UiTestAuthenticator

All Known Implementing Classes:
UiTest.DefaultUiTestAuthenticator

public interface UiTestAuthenticator
Interface to be implemented by classes for managing application authentication.

To provide global implementation for all test classes with JmixUiTestExtension create a spring bean that implements this interface. Before all tests extension will get bean from the context and will use it for setting/removing authentication.

To provide implementation only for concrete test class with JmixUiTestExtension create a class with default constructor that implements this interface. To set implementation use JmixUiTestExtension.withTestAuthenticator(UiTestAuthenticator) or UiTest.authenticator().

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    removeAuthentication(org.springframework.context.ApplicationContext context)
    Invoked after each test.
    void
    setupAuthentication(org.springframework.context.ApplicationContext context)
    Invoked before each test.
  • Method Details

    • setupAuthentication

      void setupAuthentication(org.springframework.context.ApplicationContext context)
      Invoked before each test.
      Parameters:
      context - application context
    • removeAuthentication

      void removeAuthentication(org.springframework.context.ApplicationContext context)
      Invoked after each test.
      Parameters:
      context - application context