| Constructor and Description |
|---|
RSASigner(PrivateKey privateKey)
Creates a new RSA signer.
|
| Modifier and Type | Method and Description |
|---|---|
String |
sign(String data,
String algorithm)
Signs the specified input data.
|
public RSASigner(PrivateKey privateKey)
privateKey - The private RSA key, algorithm must be "RSA".
Must not be null.public String sign(String data, String algorithm) throws JWSException
JWSSignersign in interface JWSSignerdata - This input should contain the header and body part of the JWT.
BASE64URL(UTF8(JOSE header)) || '.' || BASE64URL(JWS payload)algorithm - JWS algorithm used to secure the JWS.
This is the 'alg' header parameter.JWSException - If the JWS algorithm is not supported or if
signing failed for some other internal reason.Copyright © 2018 WSO2. All rights reserved.