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<KeyType> |
getKeyTypes()
Gets the selected key types.
|
Set<Use> |
getKeyUses()
Gets the selected 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 |
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(Use use)
Sets a singled selected key use.
|
void |
setKeyUses(Set<Use> uses)
Sets the selected key uses.
|
void |
setKeyUses(Use... uses)
Sets the selected 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<Use> getKeyUses()
null
if not specified.public void setKeyUse(Use use)
use
- The key use, null
if not specified.public void setKeyUses(Use... uses)
uses
- The key uses.public void setKeyUses(Set<Use> uses)
uses
- The key uses, 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 NimbusDS. All Rights Reserved.