public class JWKSelector extends Object
Supports key selection by:
Selection by X.509 certificate URL, thumbprint and chain is not supported.
Constructor and Description |
---|
JWKSelector() |
Modifier and Type | Method and Description |
---|---|
Set<Algorithm> |
getAlgorithms()
Gets the selected JOSE algorithms.
|
Set<String> |
getKeyIDs()
Gets the selected key IDs.
|
Set<KeyOperation> |
getKeyOperations()
Gets the selected key operations.
|
Set<KeyType> |
getKeyTypes()
Gets the selected key types.
|
Set<KeyUse> |
getKeyUses()
Gets the selected public key uses.
|
boolean |
isPrivateOnly()
Gets the selection of private keys.
|
boolean |
isPublicOnly()
Gets the selection of public keys.
|
List<JWK> |
select(JWKSet jwkSet)
Selects the keys from the specified JWK set that match the
configured criteria.
|
void |
setAlgorithm(Algorithm alg)
Sets a singled selected JOSE algorithm.
|
void |
setAlgorithms(Algorithm... algs)
Sets the selected JOSE algorithms.
|
void |
setAlgorithms(Set<Algorithm> algs)
Sets the selected JOSE algorithms.
|
void |
setKeyID(String id)
Sets a single selected key ID.
|
void |
setKeyIDs(Set<String> ids)
Sets the selected key IDs.
|
void |
setKeyIDs(String... ids)
Sets the selected key IDs.
|
void |
setKeyOperation(KeyOperation op)
Sets a single selected key operation.
|
void |
setKeyOperations(KeyOperation... ops)
Sets the selected key operations.
|
void |
setKeyOperations(Set<KeyOperation> ops)
Sets the selected key operations.
|
void |
setKeyType(KeyType kty)
Sets a single selected key type.
|
void |
setKeyTypes(KeyType... types)
Sets the selected key types.
|
void |
setKeyTypes(Set<KeyType> types)
Sets the selected key types.
|
void |
setKeyUse(KeyUse use)
Sets a single selected public key use.
|
void |
setKeyUses(KeyUse... uses)
Sets the selected public key uses.
|
void |
setKeyUses(Set<KeyUse> uses)
Sets the selected public key uses.
|
void |
setPrivateOnly(boolean privateOnly)
Sets the selection of private keys.
|
void |
setPublicOnly(boolean publicOnly)
Sets the selection of public keys.
|
public JWKSelector()
public Set<KeyType> getKeyTypes()
null
if not specified.public void setKeyType(KeyType kty)
kty
- The key type, null
if not specified.public void setKeyTypes(KeyType... types)
types
- The key types.public void setKeyTypes(Set<KeyType> types)
types
- The key types, null
if not specified.public Set<KeyUse> getKeyUses()
null
if not specified.public void setKeyUse(KeyUse use)
use
- The public key use, null
if not specified.public void setKeyUses(KeyUse... uses)
uses
- The public key uses.public void setKeyUses(Set<KeyUse> uses)
uses
- The public key uses, null
if not specified.public Set<KeyOperation> getKeyOperations()
null
if not specified.public void setKeyOperation(KeyOperation op)
op
- The key operation, null
if not specified.public void setKeyOperations(KeyOperation... ops)
ops
- The key operations.public void setKeyOperations(Set<KeyOperation> ops)
ops
- The key operations, null
if not specified.public Set<Algorithm> getAlgorithms()
null
if not specified.public void setAlgorithm(Algorithm alg)
alg
- The JOSE algorithm, null
if not specified.public void setAlgorithms(Algorithm... algs)
algs
- The JOSE algorithms.public void setAlgorithms(Set<Algorithm> algs)
algs
- The JOSE algorithms, null
if not specified.public Set<String> getKeyIDs()
null
if not specified.public void setKeyIDs(String... ids)
ids
- The key IDs.public void setKeyIDs(Set<String> ids)
ids
- The key IDs, null
if not specified.public void setKeyID(String id)
id
- The key ID, null
if not specified.public boolean isPrivateOnly()
true
only private keys are selected.public void setPrivateOnly(boolean privateOnly)
privateOnly
- If true
only private keys are selected.public boolean isPublicOnly()
true
only public keys are selected.public void setPublicOnly(boolean publicOnly)
publicOnly
- If true
only public keys are selected.Copyright © 2014 Connect2id Ltd.. All Rights Reserved.