com.nimbusds.jose
Interface JWSVerifier

All Superinterfaces:
JWSAlgorithmProvider
All Known Implementing Classes:
ECDSAVerifier, MACVerifier, RSASSAVerifier

public interface JWSVerifier
extends JWSAlgorithmProvider

Interface for verifying JSON Web Signature (JWS) objects.

Callers can query the verifier to determine its algorithm capabilities as well as the JWS algorithms and header parameters that are accepted for processing.

Version:
$version$ (2013-05-04)
Author:
Vladimir Dzhuvinov

Method Summary
 JWSHeaderFilter getJWSHeaderFilter()
          Gets the JWS header filter associated with the verifier.
 boolean verify(ReadOnlyJWSHeader header, byte[] signingInput, Base64URL signature)
          Verifies the specified signature of a JWS object.
 
Methods inherited from interface com.nimbusds.jose.JWSAlgorithmProvider
supportedAlgorithms
 

Method Detail

getJWSHeaderFilter

JWSHeaderFilter getJWSHeaderFilter()
Gets the JWS header filter associated with the verifier. Specifies the names of those supported JWS algorithms and header parameters that the verifier is configured to accept.

Attempting to verify a JWS object signature with an algorithm or header parameter that is not accepted must result in a JOSEException.

Returns:
The JWS header filter.

verify

boolean verify(ReadOnlyJWSHeader header,
               byte[] signingInput,
               Base64URL signature)
               throws JOSEException
Verifies the specified signature of a JWS object.

Parameters:
header - The JSON Web Signature (JWS) header. Must specify an accepted JWS algorithm, must contain only accepted header parameters, and must not be null.
signingInput - The signing input. Must not be null.
signature - The signature part of the JWS object. Must not be null.
Returns:
true if the signature was successfully verified, else false.
Throws:
JOSEException - If the JWS algorithm is not accepted, if a header parameter is not accepted, or if signature verification failed for some other reason.


Copyright © 2013 NimbusDS. All Rights Reserved.