- All Superinterfaces:
JOSEObjectService
The JWS Service is the main entry point for creating and reading JSON Web Signature objects.
It allows to fluently create JWS objects using JWSBuilder
for compact serialization or JsonJWSBuilder
for JSON serialization. It also exposes JWSReader
and
JsonJWSReader
to read JWS compact representation or JWS JSON representation respectively.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> JWSBuilder
<T, ?, ?> builder()
Returns a new JOSE object builder.default <T> JWSBuilder
<T, ?, ?> Returns a new JOSE object builder with the specified payload type.default <T> JWSBuilder
<T, ?, ?> Returns a new JOSE object builder with the specified payload type and using the specified keys.default <T> JWSBuilder
<T, ?, ?> Returns a new JOSE object builder with the specified payload type.<T> JWSBuilder
<T, ?, ?> Returns a new JOSE object builder with the specified payload type and using the specified keys.default <T> JWSBuilder
<T, ?, ?> Returns a new JOSE object builder using the specified keys.default <T> JsonJWSBuilder
<T, ?, ?> Returns a new JSON JOSE object builder.default <T> JsonJWSBuilder
<T, ?, ?> jsonBuilder
(Class<T> type) Returns a new JSON JOSE object builder with the specified payload type.<T> JsonJWSBuilder
<T, ?, ?> jsonBuilder
(Type type) Returns a new JSON JOSE object builder with the specified payload type.default <T> JsonJWSReader
<T, ?> jsonReader
(Class<T> type) Returns a new JSON JOSE object reader with the specified payload type.<T> JsonJWSReader
<T, ?> jsonReader
(Type type) Returns a new JSON JOSE object reader with the specified payload type.default <T> JWSReader
<T, ?> Returns a new JOSE object reader with the specified payload type.default <T> JWSReader
<T, ?> Returns a new JOSE object reader with the specified payload type and using the specified keys.default <T> JWSReader
<T, ?> Returns a new JOSE object reader with the specified payload type.<T> JWSReader
<T, ?> Returns a new JOSE object reader with the specified payload type and using the specified keys.
-
Method Details
-
builder
Description copied from interface:JOSEObjectService
Returns a new JOSE object builder.
The returned builder will try to resolve the JWK to use to secure the JOSE object based on the JOSE header. It will fail if it wasn't able to find a suitable key.
- Specified by:
builder
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Returns:
- a new JOSE object builder
-
builder
Description copied from interface:JOSEObjectService
Returns a new JOSE object builder with the specified payload type.
The returned builder will try to resolve the JWK to use to secure the JOSE object based on the JOSE header. It will fail if it wasn't able to find a suitable key.
- Specified by:
builder
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload type- Returns:
- a new JOSE object builder
-
builder
Description copied from interface:JOSEObjectService
Returns a new JOSE object builder with the specified payload type.
The returned builder will try to resolve the JWK to use to secure the JOSE object based on the JOSE header. It will fail if it wasn't able to find a suitable key.
- Specified by:
builder
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload type- Returns:
- a new JOSE object builder
-
builder
Description copied from interface:JOSEObjectService
Returns a new JOSE object builder using the specified keys.
The returned builder will use the specified keys to secure the JOSE object, the first succeeding key will be retained and remaining keys will be ignored. It will fail if no suitable key have been specified or if they are not consistent with the JOSE header.
- Specified by:
builder
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
keys
- the keys to consider to secure the JOSE object- Returns:
- a new JOSE object builder
-
builder
Description copied from interface:JOSEObjectService
Returns a new JOSE object builder with the specified payload type and using the specified keys.
The returned builder will use the specified keys to secure the JOSE object, the first succeeding key will be retained and remaining keys will be ignored. It will fail if no suitable key have been specified or if they are not consistent with the JOSE header.
- Specified by:
builder
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload typekeys
- the keys to consider to secure the JOSE object- Returns:
- a new JOSE object builder
-
builder
Description copied from interface:JOSEObjectService
Returns a new JOSE object builder with the specified payload type and using the specified keys.
The returned builder will use the specified keys to secure the JOSE object, the first succeeding key will be retained and remaining keys will be ignored. It will fail if no suitable key have been specified or if they are not consistent with the JOSE header.
- Specified by:
builder
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload typekeys
- the keys to consider to secure the JOSE object- Returns:
- a new JOSE object builder
-
reader
Description copied from interface:JOSEObjectService
Returns a new JOSE object reader with the specified payload type.
The returned reader will try to resolve the public JWK that corresponds to the key used to secure the JOSE object based on the JOSE header. It will fail if it wasn't able to find a suitable key.
- Specified by:
reader
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload type- Returns:
- a new JOSE object reader
-
reader
Description copied from interface:JOSEObjectService
Returns a new JOSE object reader with the specified payload type.
The returned reader will try to resolve the public JWK that corresponds to the key used to secure the JOSE object based on the JOSE header. It will fail if it wasn't able to find a suitable key.
- Specified by:
reader
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload type- Returns:
- a new JOSE object reader
-
reader
Description copied from interface:JOSEObjectService
Returns a new JOSE object reader with the specified payload type and using the specified keys.
The returned reader will use the specified keys to verify or decrypt the JOSE object, the first succeeding key will be retained and remaining keys will be ignored. It will fail if no suitable key have been specified or if they are not consistent with the JOSE header.
- Specified by:
reader
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload typekeys
- the keys to consider to verify or decrypt the JOSE object- Returns:
- a new JOSE object reader
-
reader
Description copied from interface:JOSEObjectService
Returns a new JOSE object reader with the specified payload type and using the specified keys.
The returned reader will use the specified keys to verify or decrypt the JOSE object, the first succeeding key will be retained and remaining keys will be ignored. It will fail if no suitable key have been specified or if they are not consistent with the JOSE header.
- Specified by:
reader
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload typekeys
- the keys to consider to verify or decrypt the JOSE object- Returns:
- a new JOSE object reader
-
jsonBuilder
Description copied from interface:JOSEObjectService
Returns a new JSON JOSE object builder.
- Specified by:
jsonBuilder
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Returns:
- a new JSON JOSE object builder
-
jsonBuilder
Description copied from interface:JOSEObjectService
Returns a new JSON JOSE object builder with the specified payload type.
- Specified by:
jsonBuilder
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload type- Returns:
- a new JSON JOSE object builder
-
jsonBuilder
Description copied from interface:JOSEObjectService
Returns a new JSON JOSE object builder with the specified payload type.
- Specified by:
jsonBuilder
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload type- Returns:
- a new JSON JOSE object builder
-
jsonReader
Description copied from interface:JOSEObjectService
Returns a new JSON JOSE object reader with the specified payload type.
- Specified by:
jsonReader
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload type- Returns:
- a new JSON JOSE object reader
-
jsonReader
Description copied from interface:JOSEObjectService
Returns a new JSON JOSE object reader with the specified payload type.
- Specified by:
jsonReader
in interfaceJOSEObjectService
- Type Parameters:
T
- the payload type- Parameters:
type
- the payload type- Returns:
- a new JSON JOSE object reader
-