signWith
Looks up the private key from registry and builds a JWS compact serialization.
The registry is searched using algorithm and keyId as the look-up criteria (see DefaultJwtProcessorRegistry for the full look-up order). If no matching key is found an IllegalStateException is thrown.
Passing co.touchlab.kjwt.model.algorithm.SigningAlgorithm.None delegates directly to build (unsecured token) without consulting the registry.
Return
the resulting JwtInstance.Jws compact serialization
Parameters
the signing algorithm to use
the registry to look up the JwsSigner processor
optional key ID used for registry look-up and embedded in the JWT header's kid field. Defaults to null.
See also
Throws
Suspends, signs the token using the given JwsSigner, and returns the JWS compact serialization.
The signer is responsible for the signing operation; no registry look-up is performed. The kid header parameter is set to keyId when provided.
Return
the resulting JwtInstance.Jws compact serialization
Parameters
the JwsSigner that performs the signing operation
optional key ID to embed in the JWT header's kid field. Defaults to JwsSigner.keyId.