public class SingleKeyJWSKeySelector<C extends SecurityContext> extends Object implements JWSKeySelector<C>
JWSKeySelector that always returns the same Key.| Constructor and Description |
|---|
SingleKeyJWSKeySelector(JWSAlgorithm expectedJWSAlg,
Key key)
Creates a new single-key JWS key selector.
|
| Modifier and Type | Method and Description |
|---|---|
List<? extends Key> |
selectJWSKeys(JWSHeader header,
C context)
Selects key candidates for verifying a JWS object.
|
public SingleKeyJWSKeySelector(JWSAlgorithm expectedJWSAlg, Key key)
expectedJWSAlg - The expected JWS algorithm for the JWS
objects to be verified. Must not be
null.key - The key to always return. Must not be
null.public List<? extends Key> selectJWSKeys(JWSHeader header, C context)
JWSKeySelectorselectJWSKeys in interface JWSKeySelector<C extends SecurityContext>header - The header of the JWS object. Must not be
null.context - Optional context of the JWS object, null if
not required.Copyright © 2019 Connect2id Ltd.. All rights reserved.