Crate tokkit [] [src]

tokkit

crates.io docs.rs downloads [build Status](https://travis-ci. org/chridou/tokkit) [license-mit](https://github. com/chridou/tokkit/blob/master/LICENSE-MIT) [license-apache](https://github. com/chridou/tokkit/blob/master/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

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();

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

Modules

client

Different implementations

parsers

Various parsers for the responses of a token info service.

token_manager

Managing AccessTokens.

Structs

AccessToken

An access token

InitializationError

An error to be returned if the initialization of a component or else fails.

NotAuthorized

There is no authorization for the requested resource

Scope

An access token scope

TokenInfo

Information on an AccessToken returned by a TokenInfoService.

TokenInfoError
UserId

An id that uniquely identifies the owner of a protected resource

Enums

TokenInfoErrorKind

Traits

TokenInfoService

Gives a TokenInfo for an AccessToken.

Type Definitions

InitializationResult

A Result where the failure is always an InitializationError

TokenInfoResult