Interface SecurityContextFactory

All Known Implementing Classes:
HadoopSecurityContextFactory, NoOpSecurityContextFactory
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SecurityContextFactory
A factory for a SecurityContext.

There can only be one security context installed in each secure runtime.

  • Method Details

    • isCompatibleWith

      default boolean isCompatibleWith(SecurityConfiguration securityConfig)
      Check if this factory is compatible with the security configuration.

      Specific implementation must override this to provide compatibility check, by default it will always return false.

      Parameters:
      securityConfig - security configurations.
      Returns:
      true if factory is compatible with the configuration.
    • createContext

      create security context.
      Parameters:
      securityConfig - security configuration used to create context.
      Returns:
      the security context object.
      Throws:
      SecurityContextInitializeException