#OAUTH2 #token #token-info #s2s

tokkit

A simple(simplistic) OAUTH toolkit

39 releases (12 breaking)

0.14.0 Aug 1, 2018
0.13.0 Jul 26, 2018
0.12.1 Jul 26, 2018
0.7.3 Mar 22, 2018
0.1.0 Jul 19, 2017

#25 in Web programming

Download history 364/week @ 2018-06-25 174/week @ 2018-07-02 36/week @ 2018-07-09 142/week @ 2018-07-16 72/week @ 2018-07-23 120/week @ 2018-07-30 188/week @ 2018-08-06 141/week @ 2018-08-13 57/week @ 2018-08-20 85/week @ 2018-08-27 82/week @ 2018-09-03 80/week @ 2018-09-10 81/week @ 2018-09-17

553 downloads per month

Apache-2.0/MIT

185KB
4K SLoC

tokkit

crates.io docs.rs downloads build Status license-mit license-apache

tokkit is a simple(even simplistic) token toolkit for OAUTH2 token introspection

Adding tokkit to your project

tokkit is available on crates.io.

Documentation

The documentation is available online.

Features

  • async: Adds a hyper based async client. See also TokenInfoServiceClientBuilder
  • metrix: Add support for the metrix crate(async client only) See also TokenInfoServiceClientBuilder

Verify Access Tokens

tokkit contains a module token_info for protected resources to verify access tokens.

use tokkit::*;
use tokkit::client::*;

let builder = TokenInfoServiceClientBuilder::google_v3();

let service = builder.build().unwrap();

let token = AccessToken::new("<token>");

let tokeninfo = service.introspect(&token).unwrap();

Recent changes

  • 0.15.3
    • Use reqwest 0.9
  • 0.15.2
    • Async Client has default https connector
  • 0.15.1
    • Async Client can be created with a given Executor
  • 0.15.0
    • updated metrix
  • 0.14.0
    • Add a client that takes an HttpClient as a parameter
  • 0.13.0
    • parser does not need the http client in an Arc* 0.12.1

License

tokkit is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

Copyright (c) 2017 Christian Douven Token verification for protected resources on resource servers.

See OAuth 2.0 Token Introspection and Roles

License: Apache-2.0/MIT

Dependencies

~14MB
~320K SLoC