Compare commits
2 commits
c4d97f378f
...
0835c0118e
Author | SHA1 | Date | |
---|---|---|---|
asonix | 0835c0118e | ||
asonix | 5dec9f6427 |
|
@ -1,17 +1,21 @@
|
||||||
[package]
|
[package]
|
||||||
name = "actix-webfinger"
|
name = "actix-webfinger"
|
||||||
description = "Types and helpers to create and fetch Webfinger resources"
|
description = "Types and helpers to create and fetch Webfinger resources"
|
||||||
version = "0.4.1"
|
version = "0.5.0"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
authors = ["asonix <asonix@asonix.dog>"]
|
authors = ["asonix <asonix@asonix.dog>"]
|
||||||
repository = "https://git.asonix.dog/asonix/actix-webfinger"
|
repository = "https://git.asonix.dog/asonix/actix-webfinger"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["client"]
|
||||||
|
client = ["dep:awc"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-rt = "2.6.0"
|
actix-rt = "2.6.0"
|
||||||
actix-web = { version = "4.0.1", default-features = false }
|
actix-web = { version = "4.0.1", default-features = false }
|
||||||
awc = { version = "3.0.0", default-features = false }
|
awc = { version = "3.0.0", default-features = false, optional = true }
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
|
|
12
flake.lock
12
flake.lock
|
@ -5,11 +5,11 @@
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685518550,
|
"lastModified": 1689068808,
|
||||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -20,11 +20,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685655444,
|
"lastModified": 1692174805,
|
||||||
"narHash": "sha256-6EujQNAeaUkWvpEZZcVF8qSfQrNVWFNNGbUJxv/A5a8=",
|
"narHash": "sha256-xmNPFDi/AUMIxwgOH/IVom55Dks34u1g7sFKKebxUm0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e635192892f5abbc2289eaac3a73cdb249abaefd",
|
"rev": "caac0eb6bdcad0b32cb2522e03e4002c8975c62e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -117,6 +117,7 @@ use actix_web::{
|
||||||
web::{get, Query},
|
web::{get, Query},
|
||||||
FromRequest, HttpResponse, Resource,
|
FromRequest, HttpResponse, Resource,
|
||||||
};
|
};
|
||||||
|
#[cfg(feature = "client")]
|
||||||
use awc::Client;
|
use awc::Client;
|
||||||
use serde_derive::{Deserialize, Serialize};
|
use serde_derive::{Deserialize, Serialize};
|
||||||
use std::{future::Future, pin::Pin};
|
use std::{future::Future, pin::Pin};
|
||||||
|
@ -635,6 +636,7 @@ impl Webfinger {
|
||||||
.json(&self)
|
.json(&self)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "client")]
|
||||||
/// Fetch a webfinger with subject `user` from a given `domain`
|
/// Fetch a webfinger with subject `user` from a given `domain`
|
||||||
///
|
///
|
||||||
/// This method takes a `Client` so derivative works can provide their own configured clients
|
/// This method takes a `Client` so derivative works can provide their own configured clients
|
||||||
|
|
Loading…
Reference in a new issue