Class SigningConsentorResult

Object
se.curity.identityserver.sdk.oauth.consent.SigningConsentorResult
Direct Known Subclasses:
SigningConsentorResult.Pending, SigningConsentorResult.Success, SigningConsentorResult.Unsuccessful

public abstract class SigningConsentorResult extends Object
Represents the result of applying a signing consentor.
Since:
4.1.0
  • Field Details

  • Method Details

    • success

      public static SigningConsentorResult.Success success(ConsentorResultAttributes consentorResultAttributes)
      Creates a success result with the related attributes. Used when the signing consentor is done and returns the results.
      Parameters:
      consentorResultAttributes - the consent attributes returned by the consentor.
      Returns:
      A success result.
    • pending

      Creates a pending result. Used when the signing consentor processing needs to be continued, e.g. by an interaction step. It contains the response model that will be showing data on forms or redirect.
      Parameters:
      responseModel - the response model to be shown in any forms.
      Returns:
      A pending result including the response model.
    • pendingUserCompletion

      public static SigningConsentorResult.Pending pendingUserCompletion()
      Creates a result pending user action. Used when the signing consentor processing needs to be continued, e.g. by an interaction step. It is empty so that should indicate for instance to continue polling via a form or asynchronous call.
      Returns:
      A pending result without a response model.
    • pendingUserCompletion

      Creates a pending result containing an additional info. e.g. autostart Token or QR code image
      Parameters:
      model - Pending Completion Data Model
      Returns:
      A pending result including the Template Model containing additional info.
      Since:
      7.0
    • unsuccessfulResult

      public static SigningConsentorResult.Unsuccessful unsuccessfulResult(String errorDescription, ErrorCode errorCode)
      Creates an Unsuccessful result. Used when the consentor is not able to finish the consent process, not necessarily due to an error (e.g. cancellation).
      Parameters:
      errorDescription - A string describing the error.
      errorCode - The ErrorCode associated to the failed result.
      Returns:
      An Unsuccessful result.