+26
-10
Cargo.lock
+26
-10
Cargo.lock
···
171
171
172
172
[[package]]
173
173
name = "atproto-client"
174
-
version = "0.6.0"
174
+
version = "0.9.5"
175
175
source = "registry+https://github.com/rust-lang/crates.io-index"
176
-
checksum = "aa0602d75861a85bd30eab325e4aa2f1b940a3fa113f220f9d10c933dcce3793"
176
+
checksum = "9c10caaa4a574cb8c8fa4a4eb92aa50cb44dc7e21adaf675b2bf871cb4961730"
177
177
dependencies = [
178
178
"anyhow",
179
179
"atproto-identity",
···
193
193
194
194
[[package]]
195
195
name = "atproto-identity"
196
-
version = "0.6.0"
196
+
version = "0.9.5"
197
197
source = "registry+https://github.com/rust-lang/crates.io-index"
198
-
checksum = "e42ad430a638d7732f9306e7dd66eae5a7bd13e8323c68958fa664decdf8618f"
198
+
checksum = "51c6a477bdd0dda0f298af1a366f7e764ef677997448d981ceaecbbd1a6143ee"
199
199
dependencies = [
200
200
"anyhow",
201
201
"async-trait",
···
208
208
"lru",
209
209
"multibase",
210
210
"p256",
211
+
"p384",
211
212
"rand 0.8.5",
212
213
"reqwest",
213
214
"serde",
···
220
221
221
222
[[package]]
222
223
name = "atproto-jetstream"
223
-
version = "0.6.0"
224
+
version = "0.9.5"
224
225
source = "registry+https://github.com/rust-lang/crates.io-index"
225
-
checksum = "773b5ab60852dbc4621a8119568b5a894d0e6caf5627f74f4a47144758c5ceef"
226
+
checksum = "62275c8f0ed5dfe9ee19b98223934930504a4d61354bfcdc219704f8b71f8aa6"
226
227
dependencies = [
227
228
"anyhow",
228
229
"async-trait",
···
243
244
244
245
[[package]]
245
246
name = "atproto-oauth"
246
-
version = "0.6.0"
247
+
version = "0.9.5"
247
248
source = "registry+https://github.com/rust-lang/crates.io-index"
248
-
checksum = "c698e8f90e9d8e22eb0fa04dece63be9d0441b9120f511a841aa320622ccb53f"
249
+
checksum = "a71fb171bf1d56406e2a47a7ff4a54a2ad8181ac94d6884a30b762acc96bf7c7"
249
250
dependencies = [
250
251
"anyhow",
251
252
"async-trait",
···
260
261
"lru",
261
262
"multibase",
262
263
"p256",
264
+
"p384",
263
265
"rand 0.8.5",
264
266
"reqwest",
265
267
"reqwest-chain",
···
276
278
277
279
[[package]]
278
280
name = "atproto-record"
279
-
version = "0.6.0"
281
+
version = "0.9.5"
280
282
source = "registry+https://github.com/rust-lang/crates.io-index"
281
-
checksum = "d6aee95d1ccee1e0b39d520e5308e2984780925aa78fdc0c7cd05c66dd22f1fe"
283
+
checksum = "16244fe2415e6ab43bfb0b52e9dea96ae44537937b2cd553c163429719d1b8c3"
282
284
dependencies = [
283
285
"anyhow",
284
286
"atproto-identity",
···
908
910
"ff",
909
911
"generic-array",
910
912
"group",
913
+
"hkdf",
911
914
"pem-rfc7468",
912
915
"pkcs8",
913
916
"rand_core 0.6.4",
···
2501
2504
version = "0.13.2"
2502
2505
source = "registry+https://github.com/rust-lang/crates.io-index"
2503
2506
checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b"
2507
+
dependencies = [
2508
+
"ecdsa",
2509
+
"elliptic-curve",
2510
+
"primeorder",
2511
+
"serdect",
2512
+
"sha2",
2513
+
]
2514
+
2515
+
[[package]]
2516
+
name = "p384"
2517
+
version = "0.13.1"
2518
+
source = "registry+https://github.com/rust-lang/crates.io-index"
2519
+
checksum = "fe42f1670a52a47d448f14b6a5c61dd78fce51856e68edaa38f7ae3a46b8d6b6"
2504
2520
dependencies = [
2505
2521
"ecdsa",
2506
2522
"elliptic-curve",
+4
-9
Cargo.toml
+4
-9
Cargo.toml
···
16
16
17
17
[dependencies]
18
18
# ATProtocol dependencies
19
-
# atproto-client = { path = "/Users/nick/development/tangled.sh/smokesignal.events/atproto-identity-rs/crates/atproto-client" }
20
-
# atproto-identity = { path = "/Users/nick/development/tangled.sh/smokesignal.events/atproto-identity-rs/crates/atproto-identity" }
21
-
# atproto-record = { path = "/Users/nick/development/tangled.sh/smokesignal.events/atproto-identity-rs/crates/atproto-record" }
22
-
# atproto-jetstream = { path = "/Users/nick/development/tangled.sh/smokesignal.events/atproto-identity-rs/crates/atproto-jetstream" }
23
-
24
-
atproto-client = { version = "0.6.0" }
25
-
atproto-identity = { version = "0.6.0" }
26
-
atproto-record = { version = "0.6.0" }
27
-
atproto-jetstream = { version = "0.6.0" }
19
+
atproto-client = { version = "0.9.5" }
20
+
atproto-identity = { version = "0.9.5" }
21
+
atproto-record = { version = "0.9.5" }
22
+
atproto-jetstream = { version = "0.9.5" }
28
23
29
24
# Web framework
30
25
axum = "0.8"
-1
src/bin/showcase.rs
-1
src/bin/showcase.rs
···
34
34
#[cfg(feature = "reload")]
35
35
use showcase::templates::build_env;
36
36
37
-
38
37
/// Create the appropriate FileStorage implementation based on the storage configuration
39
38
fn create_file_storage(storage_config: &str) -> Result<Arc<dyn FileStorage>> {
40
39
if storage_config.starts_with("s3://") {
+3
-3
src/http.rs
+3
-3
src/http.rs
···
273
273
fn format_signers(signer_identities: &[crate::storage::Identity]) -> Vec<String> {
274
274
let handles: Vec<String> = signer_identities
275
275
.iter()
276
-
.map(|i| format!("{}", i.handle))
276
+
.map(|i| i.handle.to_string())
277
277
.collect();
278
278
279
279
if handles.len() <= 3 {
···
310
310
];
311
311
312
312
let result = format_signers(&identities);
313
-
assert_eq!(result, vec!["@alice.bsky.social", "@bob.bsky.social"]);
313
+
assert_eq!(result, vec!["alice.bsky.social", "bob.bsky.social"]);
314
314
315
315
let many_identities = vec![
316
316
Identity {
···
346
346
let result = format_signers(&many_identities);
347
347
assert_eq!(
348
348
result,
349
-
vec!["@alice.bsky.social", "@bob.bsky.social", "and 2 others"]
349
+
vec!["alice.bsky.social", "bob.bsky.social", "and 2 others"]
350
350
);
351
351
}
352
352
+1
-4
src/process.rs
+1
-4
src/process.rs
···
173
173
174
174
// Ensure identity is stored
175
175
let document = self.ensure_identity_stored(did).await?;
176
-
tracing::debug!(?document, "resolved award DID");
177
176
178
177
// Get or create badge
179
178
let badge = self.get_or_create_badge(&award_record.badge).await?;
180
179
181
180
let badge_aturi = ATURI::from_str(&award_record.badge.uri)?;
182
-
183
-
tracing::debug!(?badge, "processing badge");
184
181
185
182
let badge_isser_document = self.ensure_identity_stored(&badge_aturi.authority).await?;
186
183
···
346
343
atproto_client::com::atproto::repo::GetRecordResponse::Error(simple_error) => {
347
344
Err(ShowcaseError::ProcessBadgeRecordFetchFailed {
348
345
uri: format!("at://{}/community.lexicon.badge.definition/{}", did, rkey),
349
-
details: format!("Get record returned an error: {:?}", simple_error),
346
+
details: format!("Get record returned an error: {}", simple_error.error_message()),
350
347
})
351
348
}
352
349
}
+1
-1
src/storage/file_storage.rs
+1
-1
src/storage/file_storage.rs
···
431
431
let url = "s3://the_key:the_secret@example.com/showcase-badges";
432
432
let result = parse_s3_url(url).unwrap();
433
433
434
-
assert_eq!(result.0, "http://example.com"); // endpoint
434
+
assert_eq!(result.0, "https://example.com"); // endpoint
435
435
assert_eq!(result.1, "the_key"); // access_key
436
436
assert_eq!(result.2, "the_secret"); // secret_key
437
437
assert_eq!(result.3, "showcase-badges"); // bucket