aboutsummaryrefslogtreecommitdiff
path: root/bot
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2022-10-16 22:54:54 -0500
committerGitHub <noreply@github.com>2022-10-16 22:54:54 -0500
commit4cef62e8e4aa04e44048eb67e5091c12a73d2a09 (patch)
tree1c3b03bad262bdcab878cd42d445676290000bea /bot
parent993914d175609e5d291e7caafc1983379642e7fe (diff)
downloadazalea-drasl-4cef62e8e4aa04e44048eb67e5091c12a73d2a09.tar.xz
Microsoft Authentication (#29)
* a * try to do more work on auth signing (untested) * well auth works when i remove the d= so * auth stuff * sessionserver stuff * add auth in azalea-protocol/client * caching* refreshing microsoft auth tokens isn't implemented yet, also i haven't tested it * how did i not notice that i had the code duplicated * fix cache * add refreshing msa token * replace some printlns with log::trace * auth works! * Update main.rs * fix clippy warnings
Diffstat (limited to 'bot')
-rw-r--r--bot/src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/src/main.rs b/bot/src/main.rs
index 0a291fd8..92786ce1 100644
--- a/bot/src/main.rs
+++ b/bot/src/main.rs
@@ -7,10 +7,10 @@ use std::sync::Arc;
struct State {}
#[tokio::main]
-async fn main() {
+async fn main() -> anyhow::Result<()> {
env_logger::init();
- let account = Account::offline("bot");
+ let account = Account::microsoft("example2@example.com").await?;
azalea::start(azalea::Options {
account,
@@ -21,6 +21,8 @@ async fn main() {
})
.await
.unwrap();
+
+ Ok(())
}
async fn handle(bot: Client, event: Arc<Event>, _state: Arc<Mutex<State>>) -> anyhow::Result<()> {