Download crates/forge_domain/src/auth/oauth_config.rs from SaylorTwift/forgecode: direct link, hf CLI and curl.
- Browser
- Download file 946 Bytes
-
https://huggingface.co/SaylorTwift/forgecode/resolve/main/crates/forge_domain/src/auth/oauth_config.rs
- Command line
-
hf download hf://SaylorTwift/forgecode/crates/forge_domain/src/auth/oauth_config.rs
-
curl -L -o oauth_config.rs https://huggingface.co/SaylorTwift/forgecode/resolve/main/crates/forge_domain/src/auth/oauth_config.rs
946 Bytes
| use std::collections::HashMap; | |
| use serde::{Deserialize, Serialize}; | |
| use url::Url; | |
| pub struct ClientId(String); | |
| /// OAuth configuration for authentication flows | |
| pub struct OAuthConfig { | |
| pub auth_url: Url, | |
| pub token_url: Url, | |
| pub client_id: ClientId, | |
| pub scopes: Vec<String>, | |
| pub redirect_uri: Option<String>, | |
| pub use_pkce: bool, | |
| pub token_refresh_url: Option<Url>, | |
| pub custom_headers: Option<HashMap<String, String>>, | |
| pub extra_auth_params: Option<HashMap<String, String>>, | |
| } | |