Module cargo_registry::token [] [src]

Reexports

use diesel;
use diesel::prelude::*;
use conduit::Request;
use conduit::Response;
use time::Timespec;
use conduit_router::RequestParams;
use serde_json as json;
use db::RequestTransaction;
use user::RequestUser;
use user::AuthenticationSource;
use util::RequestUtils;
use util::CargoResult;
use util::ChainError;
use util::bad_request;
use util::read_fill;
use schema::api_tokens;

Structs

ApiToken

The model representing a row in the api_tokens database table.

EncodableApiToken

The serialization format for the ApiToken model without its token value.

EncodableApiTokenWithToken

The serialization format for the ApiToken model with its token value. This should only be used when initially creating a new token to minimize the chance of token leaks.

Constants

_IMPL_DESERIALIZE_FOR_EncodableApiToken
_IMPL_DESERIALIZE_FOR_EncodableApiTokenWithToken
_IMPL_QUERYABLE_FOR_APITOKEN
_IMPL_SERIALIZE_FOR_EncodableApiToken
_IMPL_SERIALIZE_FOR_EncodableApiTokenWithToken

Functions

list

Handles the GET /me/tokens route.

new

Handles the POST /me/tokens route.

revoke

Handles the DELETE /me/tokens/:id route.