Skip to content

Commit

Permalink
Merge branch 'main' into common
Browse files Browse the repository at this point in the history
  • Loading branch information
avdb13 authored Nov 21, 2024
2 parents 6f48a9a + ac1ad3f commit cc53f84
Show file tree
Hide file tree
Showing 155 changed files with 2,074 additions and 1,442 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ keywords = ["atproto", "bluesky"]

[workspace.dependencies]
# Intra-workspace dependencies
atrium-api = { version = "0.24.7", path = "atrium-api", default-features = false }
atrium-api = { version = "0.24.8", path = "atrium-api", default-features = false }
atrium-common = { version = "0.1.0", path = "atrium-common" }
atrium-identity = { version = "0.1.0", path = "atrium-oauth/identity" }
atrium-xrpc = { version = "0.11.6", path = "atrium-xrpc" }
atrium-xrpc-client = { version = "0.5.9", path = "atrium-xrpc-client" }
bsky-sdk = { version = "0.1.12", path = "bsky-sdk" }
atrium-xrpc = { version = "0.12.0", path = "atrium-xrpc" }
atrium-xrpc-client = { version = "0.5.10", path = "atrium-xrpc-client" }
bsky-sdk = { version = "0.1.13", path = "bsky-sdk" }

# DAG-CBOR codec
ipld-core = { version = "0.4.1", default-features = false, features = ["std"] }
Expand Down
8 changes: 8 additions & 0 deletions atrium-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.24.8](https://github.com/sugyan/atrium/compare/atrium-api-v0.24.7...atrium-api-v0.24.8) - 2024-11-19

### Added

- Update API, based on the latest lexicon schemas ([#256](https://github.com/sugyan/atrium/pull/256))
- Update XrpcClient, add AuthorizationToken ([#248](https://github.com/sugyan/atrium/pull/248))
- Replace OnceCell with static OnceLock for regex compilation ([#250](https://github.com/sugyan/atrium/pull/250))

## [0.24.7](https://github.com/sugyan/atrium/compare/atrium-api-v0.24.6...atrium-api-v0.24.7) - 2024-10-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion atrium-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "atrium-api"
version = "0.24.7"
version = "0.24.8"
authors = ["sugyan <[email protected]>"]
edition.workspace = true
rust-version.workspace = true
Expand Down
22 changes: 13 additions & 9 deletions atrium-api/src/agent/inner.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
use super::{Session, SessionStore};
use crate::did_doc::DidDocument;
use crate::types::string::Did;
use crate::types::TryFromUnknown;
use atrium_xrpc::error::{Error, Result, XrpcErrorKind};
use atrium_xrpc::{HttpClient, OutputDataOrBytes, XrpcClient, XrpcRequest};
use crate::types::{string::Did, TryFromUnknown};
use atrium_xrpc::{
error::{Error, Result, XrpcErrorKind},
types::AuthorizationToken,
HttpClient, OutputDataOrBytes, XrpcClient, XrpcRequest,
};
use http::{Method, Request, Response};
use serde::{de::DeserializeOwned, Serialize};
use std::fmt::Debug;
use std::sync::{Arc, RwLock};
use std::{
fmt::Debug,
sync::{Arc, RwLock},
};
use tokio::sync::{Mutex, Notify};

struct WrapperClient<S, T> {
Expand Down Expand Up @@ -72,13 +76,13 @@ where
fn base_uri(&self) -> String {
self.store.get_endpoint()
}
async fn authentication_token(&self, is_refresh: bool) -> Option<String> {
async fn authorization_token(&self, is_refresh: bool) -> Option<AuthorizationToken> {
self.store.get_session().await.map(|session| {
if is_refresh {
AuthorizationToken::Bearer(if is_refresh {
session.data.refresh_jwt
} else {
session.data.access_jwt
}
})
})
}
async fn atproto_proxy_header(&self) -> Option<String> {
Expand Down
Loading

0 comments on commit cc53f84

Please sign in to comment.