jaguar_session_jwt 2.4.1

  • Installing
  • Versions
  • 68


JWT session managers for Jaguar.


JWT session manager implements SessionManager that stores session data in JWT format.


Declare JwtConfig:

const jwtConfig = const JwtConfig('sdgdflgujsdgndsflkgjsdlnwertwert78676',
    issuer: '');

Set JwtSession as sessionManager in Jaguar's constructor:

main() async {
  final server = Jaguar(sessionManager: JwtSession(jwtConfig));
  // add routes here
  await server.serve();


JwtSession can be configured using config and validationConfig parameters.

config takes the information required to issue, sign and decode JWT tokens. Some of the important parameters are:

issuer: Issuer used in iss field of JWT audience: Audience used in aud field of JWT maxAge: Period for which the token is valid hmacKey: The key used to sign the JWT tokens. Keep this key a secret.

Configuring transport

Use io to configure how session data is transported. Built-in options are:

  1. SessionIoCookie: Stores token in cookie
  2. SessionIoAuthHeader: Stores token in authorization header
  3. SessionIoHeader: Stores token in header

By default, JwtSession uses SessionIoAuthHeader.



  • Upgraded to Jaguar 2.4.x


  • sct field in session is now Jaguar compatible.


  • JwtMapCoder for other SessionManagers to implement JWT


  • Unified JwtSession and JwtCookieSession


  • Jaguar 2.1.x

Use this package as a library

1. Depend on it

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

  jaguar_session_jwt: ^2.4.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

import 'package:jaguar_session_jwt/jaguar_session_jwt.dart';
Version Uploaded Documentation Archive
2.4.1 Dec 15, 2018 Go to the documentation of jaguar_session_jwt 2.4.1 Download jaguar_session_jwt 2.4.1 archive
2.2.1 Aug 24, 2018 Go to the documentation of jaguar_session_jwt 2.2.1 Download jaguar_session_jwt 2.2.1 archive
2.2.0 Aug 15, 2018 Go to the documentation of jaguar_session_jwt 2.2.0 Download jaguar_session_jwt 2.2.0 archive
2.1.6 Jul 12, 2018 Go to the documentation of jaguar_session_jwt 2.1.6 Download jaguar_session_jwt 2.1.6 archive
2.1.5 Jul 12, 2018 Go to the documentation of jaguar_session_jwt 2.1.5 Download jaguar_session_jwt 2.1.5 archive
2.1.4 Jul 12, 2018 Go to the documentation of jaguar_session_jwt 2.1.4 Download jaguar_session_jwt 2.1.4 archive
2.1.2 Jul 12, 2018 Go to the documentation of jaguar_session_jwt 2.1.2 Download jaguar_session_jwt 2.1.2 archive
2.1.1 Jul 11, 2018 Go to the documentation of jaguar_session_jwt 2.1.1 Download jaguar_session_jwt 2.1.1 archive
1.3.2 Feb 2, 2018 Go to the documentation of jaguar_session_jwt 1.3.2 Download jaguar_session_jwt 1.3.2 archive
1.3.1 Feb 2, 2018 Go to the documentation of jaguar_session_jwt 1.3.1 Download jaguar_session_jwt 1.3.1 archive

All 16 versions...

Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 15, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7


Detected platforms: Flutter, other

Primary library: package:jaguar_session_jwt/jaguar_session_jwt.dart with components: io.

Maintenance issues and suggestions

Fix analysis_options.yaml.

We were unable to parse analysis_options.yaml.

Maintain an example.

None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use jaguar_session_jwt.dart. Packages with multiple examples should use example/


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.65 <3.0.0
jaguar ^2.4.0 2.4.12
jaguar_jwt ^2.1.5 2.1.5
Transitive dependencies
auth_header 2.1.2
charcode 1.1.2
collection 1.14.11
convert 2.0.2
crypto 2.0.6
http_server 0.9.8+1
logging 0.11.3+2
mime 0.9.6+2
path 1.6.2
path_tree 2.2.2
stack_trace 1.9.3
typed_data 1.1.6
Dev dependencies
http ^0.11.3
jaguar_auth ^2.4.1
jaguar_common ^2.1.4 2.1.4
jaguar_reflect ^2.4.1
jaguar_resty ^2.6.2
test ^1.3.0