tuwunel_admin/query/oauth/
show_provider.rs1use tuwunel_core::Result;
2use tuwunel_service::oauth::ProviderId;
3
4use crate::admin_command;
5
6#[admin_command]
7pub(super) async fn oauth_show_provider(&self, id: ProviderId, config: bool) -> Result {
8 if config {
9 let config = self.services.oauth.providers.get_config(&id)?;
10
11 write!(self, "{config:#?}\n").await?;
12 return Ok(());
13 }
14
15 let provider = self.services.oauth.providers.get(&id).await?;
16
17 write!(self, "{provider:#?}\n").await
18}