public enum Use extends Enum<Use>
use
parameter in a JSON Web
Key (JWK).
Represents the following JWK use values:
Enum Constant and Description |
---|
ENCRYPTION
Encryption.
|
SIGNATURE
Signature.
|
Modifier and Type | Method and Description |
---|---|
static Use |
parse(String s)
Parses a JSON Web Key (JWK) use from the specified
use
parameter value. |
static Use |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Use[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Use ENCRYPTION
public static Use[] values()
for (Use c : Use.values()) System.out.println(c);
public static Use valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static Use parse(String s) throws ParseException
use
parameter value.s
- The string to parse. Must be either "sig" or "enc". Must
not be null
.ParseException
- If the string couldn't be parsed to a valid
key use.Copyright © 2013 NimbusDS. All Rights Reserved.