Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oauth session #242

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
59b8bb8
Move AtpAgent
sugyan Nov 7, 2024
0ca7a86
Add Agent and SessionManager
sugyan Nov 8, 2024
7dc3a19
Temporary fix for bsky-sdk
sugyan Nov 8, 2024
ab0b4b8
Add OAuthSession
sugyan Nov 13, 2024
83a0be3
Update
sugyan Nov 14, 2024
2cebd0c
Update oauth_client::atproto
sugyan Nov 18, 2024
a18f555
initialize crate
avdb13 Nov 8, 2024
0fbfd5a
add resolvers
avdb13 Nov 8, 2024
fa96328
add store
avdb13 Nov 8, 2024
c365c66
fix `atrium-oauth`
avdb13 Nov 8, 2024
1b7a489
add error conversions
avdb13 Nov 8, 2024
c885f41
fix identity crate
avdb13 Nov 8, 2024
2a10eac
fix oauth-client crate
avdb13 Nov 8, 2024
5c0f923
small fix
avdb13 Nov 9, 2024
cded849
change `Resolver` type signature
avdb13 Nov 15, 2024
fab85a3
add `JwtTokenType` for `XrpcClient::authentication_token`
avdb13 Nov 14, 2024
162f396
Move AtpAgent
sugyan Nov 7, 2024
a99e974
replace `AtpSessionStore` with `MapStore`
avdb13 Nov 12, 2024
b594b59
replace `SimpleStore` with `MapStore`
avdb13 Nov 12, 2024
0087dcf
remove error conversions
avdb13 Nov 12, 2024
1c862bd
fix unit tests
avdb13 Nov 12, 2024
41f760f
split `Store` into `CellStore`/`MapStore`
avdb13 Nov 14, 2024
6dcf610
deprecate `AtpSessionStore` in favor of `CellStore`
avdb13 Nov 14, 2024
ca0666f
add `SessionStore` to `OAuthClient`
avdb13 Nov 12, 2024
b6d0a25
add server agent helpers
avdb13 Nov 12, 2024
cd5702a
introduce `OAuthSession`
avdb13 Nov 14, 2024
a39da51
extend request types
avdb13 Nov 12, 2024
7268be8
generate DPoP proof for access tokens
avdb13 Nov 14, 2024
0c1f06d
implement `HttpClient` for `OAuthSession`
avdb13 Nov 14, 2024
c0b35dd
correction
avdb13 Nov 14, 2024
eab30e8
wip
avdb13 Nov 14, 2024
402a914
add refresh token error
avdb13 Nov 14, 2024
c3c8d92
change generic parameter
avdb13 Nov 20, 2024
9a0c5cc
deprecate `CellStore`
avdb13 Nov 20, 2024
eedd0d9
testing example
avdb13 Nov 20, 2024
185cfdf
rebase fixes
avdb13 Nov 21, 2024
87b4b4f
`atrium-oauth` cleanup
avdb13 Nov 21, 2024
56375a6
`atrium-api` cleanup
avdb13 Nov 21, 2024
fc11bb8
`bsky-sdk` cleanup
avdb13 Nov 21, 2024
82a9398
Merge branch 'feature/agent-rework' into oauth-session
avdb13 Nov 24, 2024
dcfd1a1
use SessionStore in OAuthSession
avdb13 Nov 24, 2024
bdfbe28
allow refresh/logout by OAuthSession
avdb13 Nov 24, 2024
7a99b89
fix tests
avdb13 Nov 24, 2024
2e2690a
debug
avdb13 Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions atrium-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ keywords.workspace = true

[dependencies]
atrium-xrpc.workspace = true
atrium-common.workspace = true
chrono = { workspace = true, features = ["serde"] }
http.workspace = true
ipld-core = { workspace = true, features = ["serde"] }
Expand Down
5 changes: 3 additions & 2 deletions atrium-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
While `AtpServiceClient` can be used for simple XRPC calls, it is better to use `AtpAgent`, which has practical features such as session management.

```rust,no_run
use atrium_api::agent::{store::MemorySessionStore, AtpAgent};
use atrium_api::agent::atp_agent::AtpAgent;
use atrium_common::store::memory::MemoryStore;
use atrium_xrpc_client::reqwest::ReqwestClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let agent = AtpAgent::new(
ReqwestClient::new("https://bsky.social"),
MemorySessionStore::default(),
MemoryStore::default(),
);
agent.login("[email protected]", "hunter2").await?;
let result = agent
Expand Down
Loading
Loading