jwt_decode_full 0.9.2 copy "jwt_decode_full: ^0.9.2" to clipboard
jwt_decode_full: ^0.9.2 copied to clipboard

A JWT decoder that allows you to extract all the necessary data like the header, payload, expiration date and issued date from a JWT.

JWT Decode Full #

Pub Version

A JWT decoder that allows you to extract all the necessary data like the header, payload, expiration date and issued date from a JWT.

Installation #

Add jwt_decode_full as a dependency in your pubspec.yaml file.

Usage

  import 'package:jwt_decode_full/jwt_decode_full.dart';

  final jwtData = jwtDecode(myToken);

  print('header: ${jwtData.header}');
  print('payload: ${jwtData.payload}');
  print('isExpired: ${jwtData.isExpired}');
  print('issued date: ${jwtData.issuedAt}');
  print('expiration date: ${jwtData.expiration}');

  /// Result:
  ///
  /// header: {alg: PS256, typ: JWT}
  /// payload: {sub: 1234567890, name: John Doe, admin: true, iat: 1516239022, exp: 1517239022}
  /// isExpired: true
  /// issued date: 2018-01-18 02:30:22.000
  /// expiration date: 2018-01-29 16:17:02.000
copied to clipboard

For more detailed examples you can check out the example project.

5
likes
160
points
5.67k
downloads

Publisher

verified publisherdbilgin.com

Weekly Downloads

2024.09.15 - 2025.03.30

A JWT decoder that allows you to extract all the necessary data like the header, payload, expiration date and issued date from a JWT.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

More

Packages that depend on jwt_decode_full