public class JWTEncoder extends Object
Constructor and Description |
---|
JWTEncoder() |
Modifier and Type | Method and Description |
---|---|
String |
encode(JWT jwt,
Signer signer)
Encode the JWT to produce a dot separated encoded string that can be sent in an HTTP request header.
|
String |
encode(JWT jwt,
Signer signer,
java.util.function.Consumer<Header> consumer)
Encode the JWT to produce a dot separated encoded string that can be sent in an HTTP request header.
|
public String encode(JWT jwt, Signer signer)
jwt
- The JWT.signer
- The signer used to add a signature to the JWT.public String encode(JWT jwt, Signer signer, java.util.function.Consumer<Header> consumer)
jwt
- The JWT.signer
- The signer used to add a signature to the JWT.consumer
- A header consumer to optionally add header values to the encoded JWT. May be null.Copyright © 2021. All rights reserved.