Class GetClientRegistrationInfoTokenCmd

java.lang.Object
com.flowable.platform.engine.impl.cmd.GetClientRegistrationInfoTokenCmd
All Implemented Interfaces:
org.flowable.common.engine.impl.interceptor.Command<String>

public class GetClientRegistrationInfoTokenCmd extends Object implements org.flowable.common.engine.impl.interceptor.Command<String>
Retrieves an access token from a ClientRegistrationInfo's token endpoint. The OAuth2 flow is determined by the registration's grantType.
Author:
Filip Hrisafov
  • Field Details

    • GRANT_TYPE_CLIENT_CREDENTIALS_VALUE

      protected static final String GRANT_TYPE_CLIENT_CREDENTIALS_VALUE
      See Also:
    • GRANT_TYPE_JWT_BEARER_VALUE

      protected static final String GRANT_TYPE_JWT_BEARER_VALUE
      See Also:
    • GRANT_TYPE_TOKEN_EXCHANGE_VALUE

      protected static final String GRANT_TYPE_TOKEN_EXCHANGE_VALUE
      See Also:
    • registrationKey

      protected final String registrationKey
    • tenantId

      protected final String tenantId
  • Constructor Details

    • GetClientRegistrationInfoTokenCmd

      public GetClientRegistrationInfoTokenCmd(String registrationKey, String tenantId)
  • Method Details

    • execute

      public String execute(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
      Specified by:
      execute in interface org.flowable.common.engine.impl.interceptor.Command<String>
    • addProtocolFormParameters

      protected void addProtocolFormParameters(org.flowable.http.common.api.HttpRequest request, ClientRegistrationInfoEntity registration, PlatformEngineConfiguration engineConfiguration)
    • resolveAssertion

      protected String resolveAssertion(PlatformEngineConfiguration engineConfiguration)
    • readResponseBody

      protected tools.jackson.databind.JsonNode readResponseBody(org.flowable.http.common.api.HttpResponse response, PlatformEngineConfiguration engineConfiguration)
    • getErrorMessage

      protected String getErrorMessage(HttpStatus status, org.flowable.http.common.api.HttpResponse response, PlatformEngineConfiguration engineConfiguration)
    • getBadRequestResponseErrorMessage

      protected String getBadRequestResponseErrorMessage(org.flowable.http.common.api.HttpResponse response, PlatformEngineConfiguration engineConfiguration)
    • getBadRequestErrorMessageFromHeaders

      protected String getBadRequestErrorMessageFromHeaders(org.flowable.http.common.api.HttpHeaders httpHeaders)
    • createErrorMessage

      protected String createErrorMessage(String errorCode, String errorDescription)