auth_params 1.0.0+1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new63

auth_params

Parser for auth-param syntax from RFC7235.

Usage

import 'package:auth_params/auth_params.dart';
import 'package:collection/collection.dart';

main() {
  final Map<String, String> data = {"job": "Developer", "name": "Charles"};

  final encoded = authParams.encode(data);

  print(encoded);
  // job="Developer",name="Charles"

  final decoded = authParams.decode(encoded);

  print(decoded);
  // {job: Developer, name: Charles}

  print(MapEquality().equals(data, decoded));
  // true
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

1.0.0+1 (2018-08-12)

  • Updated example

1.0.0 (2018-08-12)

  • Initial version

example/auth_params_example.dart

import 'package:auth_params/auth_params.dart';
import 'package:collection/collection.dart';

main() {
  final Map<String, String> data = {"job": "Developer", "name": "Charles"};

  final encoded = authParams.encode(data);

  print(encoded);
  // job="Developer",name="Charles"

  final decoded = authParams.decode(encoded);

  print(decoded);
  // {job: Developer, name: Charles}

  print(MapEquality().equals(data, decoded));
  // true
}

Use this package as a library

1. Depend on it

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


dependencies:
  auth_params: ^1.0.0+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:auth_params/auth_params.dart';
  
Version Uploaded Documentation Archive
1.0.0+1 Aug 12, 2018 Go to the documentation of auth_params 1.0.0+1 Download auth_params 1.0.0+1 archive
1.0.0 Aug 12, 2018 Go to the documentation of auth_params 1.0.0 Download auth_params 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
26
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]
63
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.11.8

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:auth_params/auth_params.dart.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
Dev dependencies
collection ^1.14.11
test ^1.0.0