Class AbstractConfirmation

java.lang.Object
com.nimbusds.oauth2.sdk.cnf.AbstractConfirmation
Direct Known Subclasses:
JWKThumbprintConfirmation, X509CertificateConfirmation

public abstract class AbstractConfirmation extends Object
Abstract confirmation.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.nimbusds.jwt.JWTClaimsSet
    applyTo(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
    Applies this confirmation to the specified JWT claims set.
    void
    mergeInto(net.minidev.json.JSONObject jsonObject)
    Merges this X.509 certificate SHA-256 confirmation into the specified JSON object.
    protected static net.minidev.json.JSONObject
    parseConfirmationJSONObject(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
    Parses a confirmation JSON object from the specified JWT claims set.
    net.minidev.json.JSONObject
    Returns this X.509 certificate SHA-256 confirmation as a JSON object.
    abstract Map.Entry<String,net.minidev.json.JSONObject>
    Returns this confirmation as a JWT claim.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • toJWTClaim

      public abstract Map.Entry<String,net.minidev.json.JSONObject> toJWTClaim()
      Returns this confirmation as a JWT claim.

      Example:

       "cnf" : { "x5t#S256" : "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" }
       
      Returns:
      The JWT claim name / value.
    • toJSONObject

      public net.minidev.json.JSONObject toJSONObject()
      Returns this X.509 certificate SHA-256 confirmation as a JSON object.

      Example:

       {
         "cnf" : { "x5t#S256" : "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" }
       }
       
      Returns:
      The JSON object.
    • mergeInto

      public void mergeInto(net.minidev.json.JSONObject jsonObject)
      Merges this X.509 certificate SHA-256 confirmation into the specified JSON object. Any existing cnf JSON object values will be preserved.

      Example:

       {
         "cnf" : { "x5t#S256" : "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" }
       }
       
      Parameters:
      jsonObject - The JSON object. Must not be null.
    • applyTo

      public com.nimbusds.jwt.JWTClaimsSet applyTo(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
      Applies this confirmation to the specified JWT claims set.
      Parameters:
      jwtClaimsSet - The JWT claims set.
      Returns:
      The modified JWT claims set.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • parseConfirmationJSONObject

      protected static net.minidev.json.JSONObject parseConfirmationJSONObject(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
      Parses a confirmation JSON object from the specified JWT claims set.
      Parameters:
      jwtClaimsSet - The JWT claims set.
      Returns:
      The confirmation JSON object, null if none.