Class KeycloakTestResource

java.lang.Object
org.apache.polaris.test.keycloak.KeycloakTestResource
All Implemented Interfaces:
io.quarkus.test.common.QuarkusTestResourceLifecycleManager

public class KeycloakTestResource extends Object implements io.quarkus.test.common.QuarkusTestResourceLifecycleManager
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.quarkus.test.common.QuarkusTestResourceLifecycleManager

    io.quarkus.test.common.QuarkusTestResourceLifecycleManager.Context, io.quarkus.test.common.QuarkusTestResourceLifecycleManager.TestInjector
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Initialization argument key for specifying service accounts to be created in the Keycloak server.
    static final String
    Initialization argument key for specifying role grants to users in the Keycloak server.
    static final String
    Initialization argument key for specifying roles to be created in the Keycloak server.
    static final String
    Initialization argument key for specifying users to be created in the Keycloak server.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    init(Map<String,String> initArgs)
     
    void
    inject(io.quarkus.test.common.QuarkusTestResourceLifecycleManager.TestInjector testInjector)
     
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.quarkus.test.common.QuarkusTestResourceLifecycleManager

    inject, order, setContext
  • Field Details

    • ROLES_ARG

      public static final String ROLES_ARG
      Initialization argument key for specifying roles to be created in the Keycloak server.

      The value associated with this key should be a comma-separated list of role names.

      See Also:
    • USERS_ARG

      public static final String USERS_ARG
      Initialization argument key for specifying users to be created in the Keycloak server.

      The value associated with this key should be a comma-separated list of user entries, where each entry is represented as a key-value pair in the format "username=password".

      See Also:
    • GRANTS_ARG

      public static final String GRANTS_ARG
      Initialization argument key for specifying role grants to users in the Keycloak server.

      The value associated with this key should be a comma-separated list of grant entries, where each entry is represented as a key-value pair in the format "username=role".

      See Also:
    • CLIENTS_ARG

      public static final String CLIENTS_ARG
      Initialization argument key for specifying service accounts to be created in the Keycloak server.

      The value associated with this key should be a comma-separated list of client entries, where each entry is represented as a key-value pair in the format "client_id=client_secret".

      See Also:
  • Constructor Details

    • KeycloakTestResource

      public KeycloakTestResource()
  • Method Details

    • init

      public void init(Map<String,String> initArgs)
      Specified by:
      init in interface io.quarkus.test.common.QuarkusTestResourceLifecycleManager
    • inject

      public void inject(io.quarkus.test.common.QuarkusTestResourceLifecycleManager.TestInjector testInjector)
      Specified by:
      inject in interface io.quarkus.test.common.QuarkusTestResourceLifecycleManager
    • start

      public Map<String,String> start()
      Specified by:
      start in interface io.quarkus.test.common.QuarkusTestResourceLifecycleManager
    • stop

      public void stop()
      Specified by:
      stop in interface io.quarkus.test.common.QuarkusTestResourceLifecycleManager