oauth 0.4.0

  • README.md
  • Installing
  • Versions
  • 62

An implementation of OAuth 1.0a, as per RFC 5849.

The client portion is designed for use with the http package. The server portion is designed to work with the dart:io HttpServer class.

Supports HMAC-SHA1 and RSA-SHA1 signatures. HMAC-SHA1 is well tested, RSA-SHA1 is completely untested and experimental. PAINTEXT signatures are unsupported.

Comes with a test suite. Please report any incompatibility issues.


  • Use Random.secure() to generate random bytes
  • Updated to work with latest versions of packages like crypto
  • BREAKING: generateParameters now takes a http package Request object rather than a BaseRequest

Use this package as a library

1. Depend on it

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

  oauth: "^0.4.0"

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:oauth/oauth.dart';
Version Uploaded Documentation Archive
0.4.0 Jan 17, 2017 Go to the documentation of oauth 0.4.0 Download oauth 0.4.0 archive
0.3.0 Nov 7, 2014 Go to the documentation of oauth 0.3.0 Download oauth 0.3.0 archive
0.2.1 Aug 9, 2014 Go to the documentation of oauth 0.2.1 Download oauth 0.2.1 archive
0.2.0 May 9, 2014 Go to the documentation of oauth 0.2.0 Download oauth 0.2.0 archive
0.1.0 Apr 21, 2014 Go to the documentation of oauth 0.1.0 Download oauth 0.1.0 archive


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

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


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


Detected platforms: unsure

Error(s) prevent platform classification:

Error(s) in lib/server_shelf.dart: Target of URI doesn't exist: 'package:shelf/shelf.dart'.


  • Fix platform conflicts.

    Error(s) prevent platform classification:

    Error(s) in lib/server_shelf.dart: Target of URI doesn't exist: 'package:shelf/shelf.dart'.

  • Running dartdoc failed.

    Make sure dartdoc runs without any issues.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 7 errors 15 hints.

    Make sure that the imported libraries are not in conflict. Error(s) in lib/server_shelf.dart: Target of URI doesn't exist: 'package:shelf/shelf.dart'.

    Strong-mode analysis of lib/server.dart failed with the following error:

    line: 153 col: 11
    The argument type '(List<Parameter>) → bool' can't be assigned to the parameter type '(Object) → FutureOr<dynamic>'.

    Similar analysis of the following files failed:

    • lib/src/token.dart (error)
    • lib/client.dart (hint)
    • lib/oauth.dart (hint)
    • lib/server_io.dart (hint)
    • lib/src/core.dart (hint)
    • lib/src/utils.dart (hint)
  • Package is getting outdated.

    The package was released 74 weeks ago.

  • 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 oauth.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
cipher >=0.7.0 <0.8.0 0.7.1
crypto ^2.0.1 2.0.5
http >=0.10.0 <0.12.0 0.11.3+16
Transitive dependencies
async 2.0.7
bignum 0.0.7 0.1.0
charcode 1.1.1
collection 1.14.10
convert 2.0.1
fixnum 0.9.1+2 0.10.7
http_parser 3.1.2
path 1.6.1
source_span 1.4.0
string_scanner 1.0.2
typed_data 1.1.5
Dev dependencies
shelf >=0.6.7+2
test >=0.10.0