mirror of
https://github.com/zhaofengli/attic.git
synced 2024-12-14 11:57:30 +00:00
Merge pull request #179 from zhaofengli/config-allow-omitting-jwt
server/config: Allow omitting jwt section entirely
This commit is contained in:
commit
b4338a1670
1 changed files with 11 additions and 0 deletions
|
@ -123,6 +123,7 @@ pub struct Config {
|
|||
pub garbage_collection: GarbageCollectionConfig,
|
||||
|
||||
/// JSON Web Token.
|
||||
#[serde(default = "Default::default")]
|
||||
pub jwt: JWTConfig,
|
||||
|
||||
/// (Deprecated Stub)
|
||||
|
@ -399,6 +400,16 @@ fn load_database_url_from_env() -> String {
|
|||
))
|
||||
}
|
||||
|
||||
impl Default for JWTConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
token_bound_issuer: None,
|
||||
token_bound_audiences: None,
|
||||
signing_config: load_jwt_signing_config_from_env(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl CompressionConfig {
|
||||
pub fn level(&self) -> CompressionLevel {
|
||||
if let Some(level) = self.level {
|
||||
|
|
Loading…
Reference in a new issue