mirror of https://github.com/jwtk/jjwt.git
Readme and JavaDoc updates for the upcoming 0.5 release
This commit is contained in:
parent
754b87a8a4
commit
027b3518ab
|
@ -38,10 +38,11 @@ Most complexity is hidden behind a convenient and readable builder-based [fluent
|
|||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.SignatureAlgorithm;
|
||||
import io.jsonwebtoken.impl.crypto.MacProvider;
|
||||
import java.security.Key;
|
||||
|
||||
// We need a signing key, so we'll create one just for this example. Usually
|
||||
// the key would be read from your application configuration instead.
|
||||
byte[] key = MacProvider.generateKey();
|
||||
Key key = MacProvider.generateKey()
|
||||
|
||||
String s = Jwts.builder().setSubject("Joe").signWith(SignatureAlgorithm.HS512, key).compact();
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue