summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-06-09 17:20:08 -0600
committermo khan <mo@mokhan.ca>2025-06-09 17:20:08 -0600
commit72c2297eda4c18f75e7d8587773b36f3ac98b309 (patch)
tree091054758812dbfa14979fabb7212a100f294e55 /src/main.rs
parent2ef774d4c52b9fb0ae0d1717b7a3568b76bccf3d (diff)
refactor: replace single shared with key rsa keys
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index 47bd1ff..25d56ea 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -6,7 +6,7 @@ fn main() {
Err(_) => String::from("127.0.0.1:7878"),
};
- let server = Server::new(bind_addr);
+ let server = Server::new(bind_addr).expect("Failed to create server");
server.start();
}
@@ -18,14 +18,13 @@ mod tests {
#[test]
fn test_oauth_server_creation() {
let server = sts::http::Server::new("127.0.0.1:0".to_string());
- // If we get here without panicking, the server was created successfully
- assert!(true);
+ assert!(server.is_ok());
}
#[test]
fn test_authorization_code_generation() {
let config = sts::Config::from_env();
- let oauth_server = sts::OAuthServer::new(&config);
+ let oauth_server = sts::OAuthServer::new(&config).expect("Failed to create OAuth server");
let mut params = HashMap::new();
params.insert("client_id".to_string(), "test_client".to_string());
params.insert(
@@ -46,7 +45,7 @@ mod tests {
#[test]
fn test_missing_client_id() {
let config = sts::Config::from_env();
- let oauth_server = sts::OAuthServer::new(&config);
+ let oauth_server = sts::OAuthServer::new(&config).expect("Failed to create OAuth server");
let mut params = HashMap::new();
params.insert(
"redirect_uri".to_string(),
@@ -62,7 +61,7 @@ mod tests {
#[test]
fn test_unsupported_response_type() {
let config = sts::Config::from_env();
- let oauth_server = sts::OAuthServer::new(&config);
+ let oauth_server = sts::OAuthServer::new(&config).expect("Failed to create OAuth server");
let mut params = HashMap::new();
params.insert("client_id".to_string(), "test_client".to_string());
params.insert(