Class StateToken

java.lang.Object
net.shibboleth.oidc.profile.core.StateToken

public class StateToken extends Object
State token holder class.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final JSONObject
    The JSON object form of the state token if the state is encoded as a JSON object.
    private final String
    The value of the state token in its serialized form ready to be added to an OAuth request.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StateToken(String stateValue, JSONObject jsonState)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the JSON object form of the state token.
    Get the value of the state token in its serialized form ready to be added to an OAuth request.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • value

      private final String value
      The value of the state token in its serialized form ready to be added to an OAuth request.
    • json

      private final JSONObject json
      The JSON object form of the state token if the state is encoded as a JSON object.
  • Constructor Details

    • StateToken

      public StateToken(@Nullable String stateValue, @Nullable JSONObject jsonState)
      Constructor.
      Parameters:
      stateValue - the value of the state token in its serialized form, can be null
      jsonState - the JSON object form of the state token, can be null.
  • Method Details

    • getValue

      @Nullable public String getValue()
      Get the value of the state token in its serialized form ready to be added to an OAuth request.
      Returns:
      the state token value
    • getJson

      @Nullable public JSONObject getJson()
      Get the JSON object form of the state token.
      Returns:
      the JSON object