blob: 0f04b84aff27fcc13229b8a2e479a6735bd3d636 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//! Extras for working with IndieAuth endpoints.
use oauth2::ExtraTokenFields;
use serde::{Deserialize, Serialize};
/// An IndieAuth access token and introspection reponse has an additional
/// `me` field.
///
/// See https://indieauth.spec.indieweb.org/#access-token-verification
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct IndieAuthToken {
me: String,
}
impl IndieAuthToken {
pub fn me(&self) -> &str {
&self.me
}
}
impl ExtraTokenFields for IndieAuthToken {}
|