Class RestCukesSecSteps

java.lang.Object
org.chenile.cucumber.security.rest.RestCukesSecSteps

@ActiveProfiles("unittest") @AutoConfigureMockMvc public class RestCukesSecSteps extends Object
Cucumber steps to facilitate injection of security tokens into the MVC request header.
See the methods below for the precise Gherkin language that has been created.
  • Field Details

    • keycloakHost

      @Value("${chenile.security.keycloak.host}") private String keycloakHost
    • tenant

      @Value("${chenile.security.keycloak.base.realm}") private String tenant
    • objectMapper

      protected final ObjectMapper objectMapper
    • context

      CukesContext context
  • Constructor Details

    • RestCukesSecSteps

      public RestCukesSecSteps()
  • Method Details

    • i_construct_an_authorized_REST_request_in_realm_for_user_and_password

      @When("I construct a REST request with authorization header in realm {string} for user {string} and password {string}") public void i_construct_an_authorized_REST_request_in_realm_for_user_and_password(String realm, String user, String password)
    • getToken

      public String getToken(String realm, String user, String password)