just_google_jwt_decoder 0.1.3

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 56

Just Google JWT decoder

A simple Google JWT decoder library for Dart with all necessary verifiers.

Usage

import 'package:just_google_jwt_decoder/just_google_jwt_decoder.dart';

main() async {
  var clientId = '<CLIENT_ID>';
  var decoder = new GoogleJwtDecoder(clientId, expirationTolerance: const Duration(seconds: 30));
  
  var encodedJwt = new EncodedJwt('<HEADER.PAYLOAD.SIGNATURE>');
  var jwt = await decoder.convert(encodedJwt);
  
  print(jwt.payload);
}

Verification

Library verifies following data:

  • If issuer is Google Accounts server
  • If user's email is verified
  • If JWT not expires
  • If audience is equal to Client ID
  • If signature is valid (automatically downloads certificates from Google servers and keep them in memory until they expires).

Get Google JWT

You can obtain a Google JWT (a.k.a. idToken) with just_google_signin library.

Changelog

0.1.0

  • Initial version

0.1.1

  • less restrictive dependency on quiver package (0.23.0 => 0.21.0).

0.1.2

  • library re-exports Jwt and EncodedJwt classes from JustJwt library.

0.1.3

  • library re-exports JwtVerificationError class from JustJwt library.

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  just_google_jwt_decoder: "^0.1.3"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:just_google_jwt_decoder/just_google_jwt_decoder.dart';
        
Version Uploaded Documentation Archive
0.1.3 Jan 3, 2017 Go to the documentation of just_google_jwt_decoder 0.1.3 Download just_google_jwt_decoder 0.1.3 archive
0.1.2 Jan 3, 2017 Go to the documentation of just_google_jwt_decoder 0.1.2 Download just_google_jwt_decoder 0.1.2 archive
0.1.1 Dec 23, 2016 Go to the documentation of just_google_jwt_decoder 0.1.1 Download just_google_jwt_decoder 0.1.1 archive
0.1.0 Nov 5, 2016 Go to the documentation of just_google_jwt_decoder 0.1.0 Download just_google_jwt_decoder 0.1.0 archive

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
19 / 100
Health:
Code health derived from static analysis. [more]
96 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
91 / 100
Overall score:
Weighted score of the above. [more]
56

Platforms

Detected platforms: web, other

Primary library: package:just_google_jwt_decoder/just_google_jwt_decoder.dart with components: mirrors.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use just_google_jwt_decoder.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.16.0 <2.0.0
http ^0.11.3 0.11.3+16
http_parser ^3.0.0 3.1.1
just_jwt ^1.3.1 1.3.1
quiver ^0.21.0 0.21.4 0.28.0
Transitive dependencies
analyzer 0.30.0+4 0.31.0+1
args 1.3.0
asn1lib 0.4.2
async 2.0.3
barback 0.15.2+14
bignum 0.1.0
charcode 1.1.1
cli_util 0.1.2+1
code_transformers 0.5.1+4
collection 1.14.5
convert 2.0.1
crypto 2.0.2+1
csslib 0.14.1
dart_style 1.0.9+1
fixnum 0.10.6
front_end 0.1.0-alpha.4.1 0.1.0-alpha.8
glob 1.1.5
html 0.13.2+2
isolate 1.1.0
kernel 0.3.0-alpha.1.1 0.3.0-alpha.5
logging 0.11.3+1
matcher 0.12.1+4
meta 1.1.2
package_config 1.0.3
path 1.4.2 1.5.1
plugin 0.2.0+2
pointycastle 0.10.0+5 0.11.1
pool 1.3.4
quiver_collection 1.0.0
quiver_iterables 1.0.1
quiver_pattern 1.0.0
reflectable 1.0.4 2.0.0-dev.1.0
rsa_pkcs 0.1.2
source_maps 0.10.4
source_span 1.4.0
stack_trace 1.9.1
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+7
yaml 2.1.13
Dev dependencies
test ^0.12.15