diff options
Diffstat (limited to 'src/indieauth.rs')
-rw-r--r-- | src/indieauth.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/indieauth.rs b/src/indieauth.rs index 27e545d..aea7e4d 100644 --- a/src/indieauth.rs +++ b/src/indieauth.rs @@ -166,6 +166,17 @@ where .build()) } Some(value) => { + match (&req.state().internal_token) { + Some(token) => if token == &value.last().to_string().split(" ").skip(1).collect::<String>() { + req.set_ext::<User>(User::new( + "", // no user ID here + "https://kittybox.fireburn.ru/", + "update delete undelete media kittybox_internal:do_what_thou_wilt" + )); + return Ok(next.run(req).await) + } + None => {} + } let endpoint = &req.state().token_endpoint; let http_client = &req.state().http_client; let token = value.last().to_string(); |