svc_authn/
lib.rs

1#[cfg_attr(feature = "diesel", macro_use)]
2#[cfg(feature = "diesel")]
3extern crate diesel;
4
5use std::fmt;
6
7pub trait Authenticable: Sync + Send {
8    fn as_account_id(&self) -> &AccountId;
9}
10
11impl fmt::Debug for &dyn Authenticable {
12    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
13        fmt.debug_struct("Authenticable").finish()
14    }
15}
16
17#[cfg(feature = "jose")]
18pub mod jose;
19
20pub use self::account::AccountId;
21#[cfg(feature = "diesel")]
22pub mod sql {
23    pub use super::account::sql::Account_id;
24}
25mod account;
26
27pub use self::error::{Error, SerializationError};
28pub mod error;
29pub mod serde;
30pub mod token;