java.lang.Object
com.azure.resourcemanager.attestation.models.JsonWebKey

public final class JsonWebKey extends Object
The JsonWebKey model.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of JsonWebKey class.
  • Method Summary

    Modifier and Type
    Method
    Description
    alg()
    Get the alg property: The "alg" (algorithm) parameter identifies the algorithm intended for use with the key.
    crv()
    Get the crv property: The "crv" (curve) parameter identifies the curve type.
    d()
    Get the d property: RSA private exponent or ECC private key.
    dp()
    Get the dp property: RSA Private Key Parameter.
    dq()
    Get the dq property: RSA Private Key Parameter.
    e()
    Get the e property: RSA public exponent, in Base64.
    k()
    Get the k property: Symmetric key.
    kid()
    Get the kid property: The "kid" (key ID) parameter is used to match a specific key.
    kty()
    Get the kty property: The "kty" (key type) parameter identifies the cryptographic algorithm family used with the key, such as "RSA" or "EC".
    n()
    Get the n property: RSA modulus, in Base64.
    p()
    Get the p property: RSA secret prime.
    q()
    Get the q property: RSA secret prime, with p < q.
    qi()
    Get the qi property: RSA Private Key Parameter.
    use()
    Get the use property: Use ("public key use") identifies the intended use of the public key.
    void
    Validates the instance.
    Set the alg property: The "alg" (algorithm) parameter identifies the algorithm intended for use with the key.
    Set the crv property: The "crv" (curve) parameter identifies the curve type.
    Set the d property: RSA private exponent or ECC private key.
    Set the dp property: RSA Private Key Parameter.
    Set the dq property: RSA Private Key Parameter.
    Set the e property: RSA public exponent, in Base64.
    Set the k property: Symmetric key.
    Set the kid property: The "kid" (key ID) parameter is used to match a specific key.
    Set the kty property: The "kty" (key type) parameter identifies the cryptographic algorithm family used with the key, such as "RSA" or "EC".
    Set the n property: RSA modulus, in Base64.
    Set the p property: RSA secret prime.
    Set the q property: RSA secret prime, with p < q.
    Set the qi property: RSA Private Key Parameter.
    Set the use property: Use ("public key use") identifies the intended use of the public key.
    Set the x property: X coordinate for the Elliptic Curve point.
    Set the x5C property: The "x5c" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280].
    Set the y property: Y coordinate for the Elliptic Curve point.
    x()
    Get the x property: X coordinate for the Elliptic Curve point.
    x5C()
    Get the x5C property: The "x5c" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280].
    y()
    Get the y property: Y coordinate for the Elliptic Curve point.

    Methods inherited from class java.lang.Object

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

    • JsonWebKey

      public JsonWebKey()
      Creates an instance of JsonWebKey class.
  • Method Details

    • alg

      public String alg()
      Get the alg property: The "alg" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA "JSON Web Signature and Encryption Algorithms" registry established by [JWA] or be a value that contains a Collision- Resistant Name.
      Returns:
      the alg value.
    • withAlg

      public JsonWebKey withAlg(String alg)
      Set the alg property: The "alg" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA "JSON Web Signature and Encryption Algorithms" registry established by [JWA] or be a value that contains a Collision- Resistant Name.
      Parameters:
      alg - the alg value to set.
      Returns:
      the JsonWebKey object itself.
    • crv

      public String crv()
      Get the crv property: The "crv" (curve) parameter identifies the curve type.
      Returns:
      the crv value.
    • withCrv

      public JsonWebKey withCrv(String crv)
      Set the crv property: The "crv" (curve) parameter identifies the curve type.
      Parameters:
      crv - the crv value to set.
      Returns:
      the JsonWebKey object itself.
    • d

      public String d()
      Get the d property: RSA private exponent or ECC private key.
      Returns:
      the d value.
    • withD

      public JsonWebKey withD(String d)
      Set the d property: RSA private exponent or ECC private key.
      Parameters:
      d - the d value to set.
      Returns:
      the JsonWebKey object itself.
    • dp

      public String dp()
      Get the dp property: RSA Private Key Parameter.
      Returns:
      the dp value.
    • withDp

      public JsonWebKey withDp(String dp)
      Set the dp property: RSA Private Key Parameter.
      Parameters:
      dp - the dp value to set.
      Returns:
      the JsonWebKey object itself.
    • dq

      public String dq()
      Get the dq property: RSA Private Key Parameter.
      Returns:
      the dq value.
    • withDq

      public JsonWebKey withDq(String dq)
      Set the dq property: RSA Private Key Parameter.
      Parameters:
      dq - the dq value to set.
      Returns:
      the JsonWebKey object itself.
    • e

      public String e()
      Get the e property: RSA public exponent, in Base64.
      Returns:
      the e value.
    • withE

      public JsonWebKey withE(String e)
      Set the e property: RSA public exponent, in Base64.
      Parameters:
      e - the e value to set.
      Returns:
      the JsonWebKey object itself.
    • k

      public String k()
      Get the k property: Symmetric key.
      Returns:
      the k value.
    • withK

      public JsonWebKey withK(String k)
      Set the k property: Symmetric key.
      Parameters:
      k - the k value to set.
      Returns:
      the JsonWebKey object itself.
    • kid

      public String kid()
      Get the kid property: The "kid" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the "kid" value is unspecified. When "kid" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct "kid" values. (One example in which different keys might use the same "kid" value is if they have different "kty" (key type) values but are considered to be equivalent alternatives by the application using them.) The "kid" value is a case-sensitive string.
      Returns:
      the kid value.
    • withKid

      public JsonWebKey withKid(String kid)
      Set the kid property: The "kid" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the "kid" value is unspecified. When "kid" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct "kid" values. (One example in which different keys might use the same "kid" value is if they have different "kty" (key type) values but are considered to be equivalent alternatives by the application using them.) The "kid" value is a case-sensitive string.
      Parameters:
      kid - the kid value to set.
      Returns:
      the JsonWebKey object itself.
    • kty

      public String kty()
      Get the kty property: The "kty" (key type) parameter identifies the cryptographic algorithm family used with the key, such as "RSA" or "EC". "kty" values should either be registered in the IANA "JSON Web Key Types" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The "kty" value is a case-sensitive string.
      Returns:
      the kty value.
    • withKty

      public JsonWebKey withKty(String kty)
      Set the kty property: The "kty" (key type) parameter identifies the cryptographic algorithm family used with the key, such as "RSA" or "EC". "kty" values should either be registered in the IANA "JSON Web Key Types" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The "kty" value is a case-sensitive string.
      Parameters:
      kty - the kty value to set.
      Returns:
      the JsonWebKey object itself.
    • n

      public String n()
      Get the n property: RSA modulus, in Base64.
      Returns:
      the n value.
    • withN

      public JsonWebKey withN(String n)
      Set the n property: RSA modulus, in Base64.
      Parameters:
      n - the n value to set.
      Returns:
      the JsonWebKey object itself.
    • p

      public String p()
      Get the p property: RSA secret prime.
      Returns:
      the p value.
    • withP

      public JsonWebKey withP(String p)
      Set the p property: RSA secret prime.
      Parameters:
      p - the p value to set.
      Returns:
      the JsonWebKey object itself.
    • q

      public String q()
      Get the q property: RSA secret prime, with p < q.
      Returns:
      the q value.
    • withQ

      public JsonWebKey withQ(String q)
      Set the q property: RSA secret prime, with p < q.
      Parameters:
      q - the q value to set.
      Returns:
      the JsonWebKey object itself.
    • qi

      public String qi()
      Get the qi property: RSA Private Key Parameter.
      Returns:
      the qi value.
    • withQi

      public JsonWebKey withQi(String qi)
      Set the qi property: RSA Private Key Parameter.
      Parameters:
      qi - the qi value to set.
      Returns:
      the JsonWebKey object itself.
    • use

      public String use()
      Get the use property: Use ("public key use") identifies the intended use of the public key. The "use" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly "sig" (signature) or "enc" (encryption).
      Returns:
      the use value.
    • withUse

      public JsonWebKey withUse(String use)
      Set the use property: Use ("public key use") identifies the intended use of the public key. The "use" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly "sig" (signature) or "enc" (encryption).
      Parameters:
      use - the use value to set.
      Returns:
      the JsonWebKey object itself.
    • x

      public String x()
      Get the x property: X coordinate for the Elliptic Curve point.
      Returns:
      the x value.
    • withX

      public JsonWebKey withX(String x)
      Set the x property: X coordinate for the Elliptic Curve point.
      Parameters:
      x - the x value to set.
      Returns:
      the JsonWebKey object itself.
    • x5C

      public List<String> x5C()
      Get the x5C property: The "x5c" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.
      Returns:
      the x5C value.
    • withX5C

      public JsonWebKey withX5C(List<String> x5C)
      Set the x5C property: The "x5c" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.
      Parameters:
      x5C - the x5C value to set.
      Returns:
      the JsonWebKey object itself.
    • y

      public String y()
      Get the y property: Y coordinate for the Elliptic Curve point.
      Returns:
      the y value.
    • withY

      public JsonWebKey withY(String y)
      Set the y property: Y coordinate for the Elliptic Curve point.
      Parameters:
      y - the y value to set.
      Returns:
      the JsonWebKey object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.