jaguar_jwt 0.3.7 copy "jaguar_jwt: ^0.3.7" to clipboard
jaguar_jwt: ^0.3.7 copied to clipboard

outdatedDart 1 only

JWT utilities for Jaguar.dart

example/example.dart

library jaguar_jwt.example;

import 'package:jaguar_jwt/jaguar_jwt.dart';

void main() {
  final key = 'dfsdffasdfdgdfgdfg456456456';
  final claimSet = new JwtClaim(
      subject: 'kleak',
      issuer: 'teja',
      audience: <String>['example.com', 'hello.com'],
      payload: {'k': 'v'});
  String token = issueJwtHS256(claimSet, key);
  print(token);

  final JwtClaim decClaimSet = verifyJwtHS256Signature(token, key);
  print(decClaimSet.toJson());

  decClaimSet.validate(issuer: 'teja', audience: 'hello.com');
}
75
likes
0
pub points
96%
popularity

Publisher

unverified uploader

JWT utilities for Jaguar.dart

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

auth_header, crypto

More

Packages that depend on jaguar_jwt