public interface JWSKeySelector<C extends SecurityContext>
verification
and further
processing.
The key selection should be based on application specific criteria, such
as recognised header parameters referencing the key (e.g. kid
,
x5t
) and / or the JWS object SecurityContext
.
See JSON Web Signature (JWS), Appendix D. Notes on Key Selection for suggestions.
Possible key types:
SecretKey
for HMAC keys.
RSAPublicKey
public RSA keys.
ECPublicKey
public EC keys.
Modifier and Type | Method and Description |
---|---|
List<? extends Key> |
selectJWSKeys(JWSHeader header,
C context)
Selects key candidates for verifying a JWS object.
|
List<? extends Key> selectJWSKeys(JWSHeader header, C context) throws KeySourceException
header
- The header of the JWS object. Must not be
null
.context
- Optional context of the JWS object, null
if
not required.KeySourceException
- If a key sourcing exception is
encountered, e.g. on remote JWK
retrieval.Copyright © 2017 Connect2id Ltd.. All rights reserved.