jaguar_jwt 0.3.9 copy "jaguar_jwt: ^0.3.9" to clipboard
jaguar_jwt: ^0.3.9 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
30
points
27.3k
downloads

Publisher

unverified uploader

Weekly Downloads

JWT utilities for Jaguar.dart

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

auth_header, crypto

More

Packages that depend on jaguar_jwt