public class RSAVerifier extends Object implements JWSVerifier
See RFC 7518, sections 3.3 for more information.
Constructor and Description |
---|
RSAVerifier(RSAPublicKey publicKey) |
Modifier and Type | Method and Description |
---|---|
boolean |
verify(String data,
String signature,
String algorithm)
Verifies the signature of the JWS object.
|
public RSAVerifier(RSAPublicKey publicKey)
public boolean verify(String data, String signature, String algorithm) throws JWSException
JWSVerifier
verify
in interface JWSVerifier
data
- This input should contain the header and body part of the JWT.
BASE64URL(UTF8(JOSE header)) || '.' || BASE64URL(JWS payload)signature
- Signature part of the JWT.algorithm
- JWS algorithm used to secure the JWS.
This is the 'alg' header parameter.true
if the signature was successfully verified,
false
if the signature is invalid or if a criticalJWSException
- If the JWS algorithm is not supported, or if
signature verification failed for some other
internal reason.Copyright © 2018 WSO2. All rights reserved.