mirror of
https://github.com/jonasroussel/dart_jsonwebtoken.git
synced 2025-08-06 13:51:08 +08:00
v1.0.0
This commit is contained in:
@ -17,7 +17,7 @@ main() {
|
||||
);
|
||||
|
||||
// Sign it
|
||||
token = jwt.sign('secret-key');
|
||||
token = jwt.sign(SecretKey('secret passphrase'));
|
||||
|
||||
print('Signed token: $token\n');
|
||||
}
|
||||
@ -25,7 +25,7 @@ main() {
|
||||
/* Verify */ {
|
||||
try {
|
||||
// Verify a token
|
||||
final jwt = JWT.verify(token, 'secret-key');
|
||||
final jwt = JWT.verify(token, SecretKey('secret passphrase'));
|
||||
|
||||
print('Payload: ${jwt.payload}');
|
||||
} on JWTExpiredError {
|
||||
|
Reference in New Issue
Block a user