feat(oauth): fixes + cache client credentials (#157)

credentials optimize
This commit is contained in:
Andrew Culberson 2025-05-07 19:18:35 -06:00 • committed by GitHub
commit 6c2e6e22ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -525,6 +525,7 @@ async fn oauth_authorization_server() -> impl IntoResponse {
registration_endpoint: format!("http://{}/oauth/register", BIND_ADDRESS),
issuer: Some(BIND_ADDRESS.to_string()),
jwks_uri: Some(format!("http://{}/oauth/jwks", BIND_ADDRESS)),
additional_fields: HashMap::new(),
};
debug!("metadata: {:?}", metadata);
(StatusCode::OK, Json(metadata))
@ -567,9 +568,10 @@ async fn oauth_register(
// return client information
let response = ClientRegistrationResponse {
client_id,
client_secret,
client_secret: Some(client_secret),
client_name: req.client_name,
redirect_uris: req.redirect_uris,
additional_fields: HashMap::new(),
};
(StatusCode::CREATED, Json(response)).into_response()