Skip to main content

apiverve_jwtdecoder 1.2.4 copy "apiverve_jwtdecoder: ^1.2.4" to clipboard
apiverve_jwtdecoder: ^1.2.4 copied to clipboard

JWT Decoder decodes JWT tokens to reveal header and payload information without performing signature verification. It handles JSON web token decode from any language over REST, so you can inspect clai [...]

JWT Decoder API - Dart/Flutter Client #

JWT Decoder decodes JWT tokens to reveal header and payload information without performing signature verification. It handles JSON web token decode from any language over REST, so you can inspect claims and expiry without adding a JWT library.

pub package License: MIT

This is the Dart/Flutter client for the JWT Decoder API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_jwtdecoder: ^1.2.4

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_jwtdecoder/apiverve_jwtdecoder.dart';

void main() async {
  final client = JwtdecoderClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "header": {
      "alg": "HS256",
      "typ": "JWT"
    },
    "payload": {
      "sub": "1234567890",
      "name": "John Doe",
      "iat": 1516239022
    },
    "signature": "SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
    "isExpired": false,
    "expiresAt": null,
    "issuedAt": "2018-01-18T01:30:22.000Z",
    "tokenAge": "2557 days",
    "algorithm": "HS256",
    "expiresIn": null,
    "notYetValid": false,
    "securityAnalysis": {
      "isUnsecured": false,
      "hasExpiration": false,
      "isLongLived": false,
      "issues": [
        "Token has no expiration (exp) claim — it never expires"
      ]
    },
    "warning": "This API only decodes JWT tokens. It does NOT verify signatures. Do not use for security validation."
  }
}

API Reference #

Authentication #

All requests require an API key. Get yours at apiverve.com.

License #

MIT License - see LICENSE for details.


Built with Dart for APIVerve

0
likes
0
points
935
downloads

Publisher

unverified uploader

Weekly Downloads

JWT Decoder decodes JWT tokens to reveal header and payload information without performing signature verification. It handles JSON web token decode from any language over REST, so you can inspect claims and expiry without adding a JWT library.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_jwtdecoder