Module io.inverno.mod.security.jose
Class GenericJWS<A>
java.lang.Object
io.inverno.mod.security.jose.internal.AbstractJOSEObject<A,JWSHeader,AbstractJOSEPayload<A>>
io.inverno.mod.security.jose.internal.jws.GenericJWS<A>
- Type Parameters:
A- the payload type
- All Implemented Interfaces:
JOSEObject<A,,JWSHeader> JWS<A>
public class GenericJWS<A>
extends AbstractJOSEObject<A,JWSHeader,AbstractJOSEPayload<A>>
implements JWS<A>
Generic JSON Web Signature implementation.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
Fields inherited from class io.inverno.mod.security.jose.internal.AbstractJOSEObject
header, payload -
Constructor Summary
ConstructorsConstructorDescriptionGenericJWS(GenericJWSHeader header, GenericJWSPayload<A> payload, String signature) Creates a generic JWS. -
Method Summary
Methods inherited from class io.inverno.mod.security.jose.internal.AbstractJOSEObject
getHeader, getPayloadMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.inverno.mod.security.jose.JOSEObject
getHeader, getPayload
-
Constructor Details
-
GenericJWS
Creates a generic JWS.
- Parameters:
header- the JWS headerpayload- the JWS payloadsignature- the Base64URL encoded signature without padding
-
-
Method Details
-
getSignature
Description copied from interface:JWSReturns the signature encoded as Base64URL.
- Specified by:
getSignaturein interfaceJWS<A>- Returns:
- the Base64URL encoded signature with no padding
-
toCompact
Description copied from interface:JOSEObjectSerializes the JOSE object to a compact representation.
- Specified by:
toCompactin interfaceJOSEObject<A,JWSHeader> - Returns:
- the compact representation of the JOSE object
- Throws:
JOSEProcessingException
-
toDetachedCompact
Description copied from interface:JWSReturns the the detached compact representation of the JWS as defined by RFC7797.
The resulting compact representation basically misses the payload part which must be communicated to the recipient by external means.
- Specified by:
toDetachedCompactin interfaceJWS<A>- Returns:
- a detached compact representation of the JWS
- Throws:
JOSEProcessingException
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceJOSEObject<A,JWSHeader> - Specified by:
hashCodein interfaceJWS<A>- Overrides:
hashCodein classAbstractJOSEObject<A,JWSHeader, AbstractJOSEPayload<A>>
-
equals
- Specified by:
equalsin interfaceJOSEObject<A,JWSHeader> - Specified by:
equalsin interfaceJWS<A>- Overrides:
equalsin classAbstractJOSEObject<A,JWSHeader, AbstractJOSEPayload<A>>
-