Class ConsentorResult

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

public abstract class ConsentorResult extends Object
Represents the result of applying a consentor
Since:
4.1.0
  • Method Details

    • success

      public static ConsentorResult.Success success(ConsentorResultAttributes consentorResultAttributes)
      Creates a success result. Used when the consentor ended successfully.
      Parameters:
      consentorResultAttributes - the consent result attributes returned by the consentor.
      Returns:
      A success result.
    • unsuccessfulResult

      public static ConsentorResult.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.
    • pending

      public static ConsentorResult.Pending pending(ConsentorCompletion action)
      Creates a pending result. Used when the consentor processing needs to be continued, e.g. by an interaction step.
      Returns:
      A pending result.
    • pendingWithRedirectCompletion

      public static ConsentorResult.Pending pendingWithRedirectCompletion(String url)
      Creates a pending redirect result. Used when the consentor processing needs to be continued by a redirect to an URL.
      Returns:
      A pending result.
    • pendingWithPromptUserCompletion

      public static ConsentorResult.Pending pendingWithPromptUserCompletion()
      Creates a pending "prompt user" result. Used when the consentor processing needs to interact with the user.
      Returns:
      A pending result.