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

outdated

Provides JWT utilities for Dart including issuing a token, verifing a token and parsing a token.

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

Provides JWT utilities for Dart including issuing a token, verifing a token and parsing a token.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

auth_header, crypto

More

Packages that depend on jaguar_jwt