Package com.nimbusds.jose.proc
Class JOSEMatcher.Builder
- java.lang.Object
-
- com.nimbusds.jose.proc.JOSEMatcher.Builder
-
- Enclosing class:
- JOSEMatcher
public static class JOSEMatcher.Builder extends Object
Builder for constructing JOSE matchers.Example usage:
JOSEMatcher matcher = new JOSEMatcher().keyID("123").build();
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JOSEMatcher.Builderalgorithm(Algorithm alg)Sets a single JOSE algorithm to match.JOSEMatcher.Builderalgorithms(Algorithm... algs)Sets multiple JOSE algorithms to match.JOSEMatcher.Builderalgorithms(Set<Algorithm> algs)Sets multiple JOSE algorithms to match.JOSEMatcherbuild()Builds a new JOSE matcher.JOSEMatcher.BuilderencryptionMethod(EncryptionMethod enc)Sets a single JOSE encryption method to match.JOSEMatcher.BuilderencryptionMethods(EncryptionMethod... encs)Sets multiple JOSE encryption methods to match.JOSEMatcher.BuilderencryptionMethods(Set<EncryptionMethod> encs)Sets multiple JOSE encryption methods to match.JOSEMatcher.BuilderjoseClass(Class<? extends JOSEObject> clazz)Sets a single JOSE class to match.JOSEMatcher.BuilderjoseClasses(Class<? extends JOSEObject>... classes)Sets multiple JOSE classes to match.JOSEMatcher.BuilderjoseClasses(Set<Class<? extends JOSEObject>> classes)Sets multiple JOSE classes to match.JOSEMatcher.BuilderjwkURL(URI jku)Sets a single JWK URL to match.JOSEMatcher.BuilderjwkURLs(URI... jkus)Sets multiple JWK URLs to match.JOSEMatcher.BuilderjwkURLs(Set<URI> jkus)Sets multiple JWK URLs to match.JOSEMatcher.BuilderkeyID(String kid)Sets a single key ID to match.JOSEMatcher.BuilderkeyIDs(String... ids)Sets multiple key IDs to match.JOSEMatcher.BuilderkeyIDs(Set<String> kids)Sets multiple key IDs to match.
-
-
-
Constructor Detail
-
Builder
public Builder()
-
-
Method Detail
-
joseClass
public JOSEMatcher.Builder joseClass(Class<? extends JOSEObject> clazz)
Sets a single JOSE class to match.- Parameters:
clazz- The JOSE class to match,nullif not specified.- Returns:
- This builder.
-
joseClasses
public JOSEMatcher.Builder joseClasses(Class<? extends JOSEObject>... classes)
Sets multiple JOSE classes to match.- Parameters:
classes- The JOSE classes to match.- Returns:
- This builder.
-
joseClasses
public JOSEMatcher.Builder joseClasses(Set<Class<? extends JOSEObject>> classes)
Sets multiple JOSE classes to match.- Parameters:
classes- The JOSE classes to match,nullif not specified.- Returns:
- This builder.
-
algorithm
public JOSEMatcher.Builder algorithm(Algorithm alg)
Sets a single JOSE algorithm to match.- Parameters:
alg- The JOSE algorithm,nullif not specified.- Returns:
- This builder.
-
algorithms
public JOSEMatcher.Builder algorithms(Algorithm... algs)
Sets multiple JOSE algorithms to match.- Parameters:
algs- The JOSE algorithms.- Returns:
- This builder.
-
algorithms
public JOSEMatcher.Builder algorithms(Set<Algorithm> algs)
Sets multiple JOSE algorithms to match.- Parameters:
algs- The JOSE algorithms,nullif not specified.- Returns:
- This builder.
-
encryptionMethod
public JOSEMatcher.Builder encryptionMethod(EncryptionMethod enc)
Sets a single JOSE encryption method to match.- Parameters:
enc- The JOSE encryption methods,nullif not specified.- Returns:
- This builder.
-
encryptionMethods
public JOSEMatcher.Builder encryptionMethods(EncryptionMethod... encs)
Sets multiple JOSE encryption methods to match.- Parameters:
encs- The JOSE encryption methods.- Returns:
- This builder.
-
encryptionMethods
public JOSEMatcher.Builder encryptionMethods(Set<EncryptionMethod> encs)
Sets multiple JOSE encryption methods to match.- Parameters:
encs- The JOSE encryption methods,nullif not specified.- Returns:
- This builder.
-
jwkURL
public JOSEMatcher.Builder jwkURL(URI jku)
Sets a single JWK URL to match.- Parameters:
jku- The JWK URL,nullif not specified.- Returns:
- This builder.
-
jwkURLs
public JOSEMatcher.Builder jwkURLs(URI... jkus)
Sets multiple JWK URLs to match.- Parameters:
jkus- The JWK URLs.- Returns:
- This builder.
-
jwkURLs
public JOSEMatcher.Builder jwkURLs(Set<URI> jkus)
Sets multiple JWK URLs to match.- Parameters:
jkus- The JWK URLs,nullif not specified.- Returns:
- This builder.
-
keyID
public JOSEMatcher.Builder keyID(String kid)
Sets a single key ID to match.- Parameters:
kid- The key ID,nullif not specified.- Returns:
- This builder.
-
keyIDs
public JOSEMatcher.Builder keyIDs(String... ids)
Sets multiple key IDs to match.- Parameters:
ids- The key IDs.- Returns:
- This builder.
-
keyIDs
public JOSEMatcher.Builder keyIDs(Set<String> kids)
Sets multiple key IDs to match.- Parameters:
kids- The key IDs,nullif not specified.- Returns:
- This builder.
-
build
public JOSEMatcher build()
Builds a new JOSE matcher.- Returns:
- The JOSE matcher.
-
-