diff options
author | Vika <vika@fireburn.ru> | 2024-08-25 17:36:24 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-08-25 17:39:12 +0300 |
commit | 15b66ea78b619696c15414d1008acfe460c94028 (patch) | |
tree | 7116cdf7d216c0dc633fdcc08f7f687e717fa264 /src/secrets.rs | |
parent | 8d182c68cc2ed973514276e1470f6d68ac1544e8 (diff) | |
download | bowl-15b66ea78b619696c15414d1008acfe460c94028.tar.zst |
Simplify the main component a lot
Uses the macro again, tries to store only the relevant parts in enums (i.e. the Micropub client, which requires a token).
Diffstat (limited to 'src/secrets.rs')
-rw-r--r-- | src/secrets.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/secrets.rs b/src/secrets.rs index c8c9bd7..fa74aa5 100644 --- a/src/secrets.rs +++ b/src/secrets.rs @@ -5,6 +5,7 @@ pub const ME: &str = "me"; pub const TOKEN_KIND: &str = "token_kind"; pub const EXPIRES_IN: &str = "expires_in"; pub const MICROPUB: &str = "micropub"; +pub const SCOPE: &str = "scope"; pub fn get_schema() -> libsecret::Schema { let mut attrs = std::collections::HashMap::new(); @@ -12,6 +13,7 @@ pub fn get_schema() -> libsecret::Schema { attrs.insert(TOKEN_KIND, libsecret::SchemaAttributeType::String); attrs.insert(MICROPUB, libsecret::SchemaAttributeType::String); attrs.insert(EXPIRES_IN, libsecret::SchemaAttributeType::Integer); + attrs.insert(SCOPE, libsecret::SchemaAttributeType::String); libsecret::Schema::new("org.indieweb.indieauth.BearerCredential", libsecret::SchemaFlags::NONE, attrs) } |