public class HskCreateRequest extends Object implements Serializable
/api/hsk/create API.
Note that parameter values specified in the request to the API cannot be
changed later. Especially, the key ID cannot be changed later. Therefore,
if you explicitly specify a key ID in the request, the value has to be
determined carefully before calling the /api/hsk/create API.
| Constructor and Description |
|---|
HskCreateRequest() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAlg()
Get the algorithm of the key on the HSM.
|
String |
getHsmName()
Get the name of the HSM.
|
String |
getKid()
Get the key ID for the key on the HSM.
|
String |
getKty()
Get the key type.
|
String |
getUse()
Get the use of the key on the HSM.
|
HskCreateRequest |
setAlg(String alg)
Set the algorithm of the key on the HSM.
|
HskCreateRequest |
setHsmName(String hsmName)
Set the name of the HSM.
|
HskCreateRequest |
setKid(String kid)
Set the key ID for the key on the HSM.
|
HskCreateRequest |
setKty(String kty)
Set the key type.
|
HskCreateRequest |
setUse(String use)
Set the use of the key on the HSM.
|
public String getKty()
"EC" or "RSA".public HskCreateRequest setKty(String kty)
kty - The key type. "EC" or "RSA".this object.public String getUse()
When the key use is "sig" (signature), the private key on the
HSM is used to sign data and the corresponding public key is used to
verify the signature.
When the key use is "enc" (encryption), the private key on the
HSM is used to decrypt encrypted data which have been encrypted with the
corresponding public key.
"sig" (signature) or "enc"
(encryption).public HskCreateRequest setUse(String use)
When the key use is "sig" (signature), the private key on the
HSM is used to sign data and the corresponding public key is used to
verify the signature.
When the key use is "enc" (encryption), the private key on the
HSM is used to decrypt encrypted data which have been encrypted with the
corresponding public key.
use - The key use. "sig" (signature) or "enc"
(encryption).this object.public String getAlg()
When the key use is "sig", the algorithm represents a signing
algorithm such as "ES256".
When the key use is "enc", the algorithm represents an
encryption algorithm such as "RSA-OAEP-256".
It is rare that HSMs support all the algorithms listed in RFC 7518 JSON Web
Algorithms (JWA). When the specified algorithm is not supported
by the HSM, the request to the /api/hsk/create API fails.
public HskCreateRequest setAlg(String alg)
When the key use is "sig", the algorithm represents a signing
algorithm such as "ES256".
When the key use is "enc", the algorithm represents an
encryption algorithm such as "RSA-OAEP-256".
It is rare that HSMs support all the algorithms listed in RFC 7518 JSON Web
Algorithms (JWA). When the specified algorithm is not supported
by the HSM, the request to the /api/hsk/create API fails.
alg - The algorithm.this object.public String getKid()
Note that the key ID cannot be changed later. Determine the key ID
carefully before calling the /api/hsk/create API. If the
kid request parameter is missing or its value is empty,
the API generates a random key ID (base64url-encoded 256-bit random
value) for the request.
Also note that Authlete does not check duplication of key IDs.
public HskCreateRequest setKid(String kid)
Note that the key ID cannot be changed later. Determine the key ID
carefully before calling the /api/hsk/create API. If the
kid request parameter is missing or its value is empty,
the API generates a random key ID (base64url-encoded 256-bit random
value) for the request.
Also note that Authlete does not check duplication of key IDs.
kid - The key ID.this object.public String getHsmName()
The identifier for the HSM that sits behind the Authlete server.
For example, "google". If the hsmName request parameter
is missing or its value is empty, the API uses the default HSM. The
value of the default HSM varies depending on the configuration of the
Authlete server.
public HskCreateRequest setHsmName(String hsmName)
The identifier for the HSM that sits behind the Authlete server.
For example, "google". If the hsmName request parameter
is missing or its value is empty, the API uses the default HSM. The
value of the default HSM varies depending on the configuration of the
Authlete server.
hsmName - The name of the HSM.this object.Copyright © 2022. All rights reserved.