Class PubSecKeyOptions

java.lang.Object
one.jpro.platform.auth.core.oauth2.PubSecKeyOptions
All Implemented Interfaces:
Options

public class PubSecKeyOptions extends Object implements Options
Options describing Key stored in PEM format.
  • Constructor Details

    • PubSecKeyOptions

      public PubSecKeyOptions()
      Default constructor
    • PubSecKeyOptions

      public PubSecKeyOptions(PubSecKeyOptions other)
      Copy constructor.
      Parameters:
      other - the options to copy
  • Method Details

    • getId

      public String getId()
      Returns the key identifier.
      Returns:
      a string
    • setId

      public PubSecKeyOptions setId(String id)
      Sets the key identifier.
      Parameters:
      id - the key identifier
      Returns:
      a reference to this, so the API can be used fluently
    • getAlgorithm

      public String getAlgorithm()
      Returns the algorithm.
      Returns:
      a string
    • setAlgorithm

      public PubSecKeyOptions setAlgorithm(String algorithm)
      Sets the algorithm.
      Parameters:
      algorithm - the algorithm
      Returns:
      a reference to this, so the API can be used fluently
    • getBuffer

      public Buffer getBuffer()
      The PEM or Secret key buffer. When working with secret materials, the material is expected to be encoded in UTF-8. PEM files are expected to be US_ASCII as the format uses a base64 encoding for the payload.
      Returns:
      the buffer
    • setBuffer

      public PubSecKeyOptions setBuffer(String buffer)
      The PEM or Secret key buffer. When working with secret materials, the material is expected to be encoded in UTF-8. PEM files are expected to be US_ASCII as the format uses a base64 encoding for the payload.
      Parameters:
      buffer - the PEM or Secret key string
      Returns:
      a reference to this, so the API can be used fluently
    • setBuffer

      public PubSecKeyOptions setBuffer(Buffer buffer)
      The PEM or Secret key buffer. When working with secret materials, the material is expected to be encoded in UTF-8. PEM files are expected to be US_ASCII as the format uses a base64 encoding for the payload.
      Parameters:
      buffer - the PEM or Secret key buffer
      Returns:
      a reference to this, so the API can be used fluently
    • toJSON

      public org.json.JSONObject toJSON()
      Description copied from interface: Options
      Convert all configuration information to JSON format.
      Specified by:
      toJSON in interface Options
      Returns:
      a JSON object.