jaguar_session_jwt 2.4.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 68

jaguar_session_jwt

JWT session managers for Jaguar.

JwtSession

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

Usage

Declare JwtConfig:

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

Set JwtSession as sessionManager in Jaguar's constructor:

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

Configuration

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.

Changelog

2.4.1

  • Upgraded to Jaguar 2.4.x

2.1.6

  • sct field in session is now Jaguar compatible.

2.1.4

  • JwtMapCoder for other SessionManagers to implement JWT

2.1.2

  • Unified JwtSession and JwtCookieSession

2.1.1

  • Jaguar 2.1.x

Use this package as a library

1. Depend on it

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


dependencies:
  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...

Popularity:
Describes how popular the package is relative to other packages. [more]
35
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
68
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

Platforms

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/readme.md.

Dependencies

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_example_session_models
jaguar_reflect ^2.4.1
jaguar_resty ^2.6.2
test ^1.3.0