Class Jwk

  • All Implemented Interfaces:

    
    public final class Jwk
    
                        

    Represents a JSON Web Key (Jwk ). A Jwk is a JSON object that represents a cryptographic key. This class provides functionalities to manage a Jwk including its creation, conversion to and from JSON, and computing a thumbprint.

    Example:

    var jwk = Jwk(
      kty: 'RSA',
      alg: 'RS256',
      use: 'sig',
      ... // other parameters
    );
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public final class Jwk.Builder

      Builder for Jwk type.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getKty() Represents the key type.
      final String getCrv() Elliptic curve name for EC keys.
      final String getUse() Represents the intended use of the public key.
      final String getAlg() Identifies the algorithm intended for use with the key.
      final String getKid() Key ID, unique identifier for the key.
      final Unit setKid(String kid) Key ID, unique identifier for the key.
      final String getD() Private key component for EC or OKP keys.
      final String getX() X coordinate for EC keys, or the public key for OKP.
      final String getY() Y coordinate for EC keys.
      final String computeThumbprint() Computes the thumbprint of the Jwk.
      String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait