Skip to content

Commit 3f7fbfc

Browse files
author
Jeremy T
committed
Merge branch 'tim/ignore_uppercase_oidc' into 'master'
Ignore public uppercased acronym OIDCIDToken See merge request TankerHQ/sdk-rust!29
2 parents a5b8f1e + 9fc7fe8 commit 3f7fbfc

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

src/verification.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ enum Type {
99
Email = 1,
1010
Passphrase = 2,
1111
VerificationKey = 3,
12+
#[allow(clippy::upper_case_acronyms)]
1213
OIDCIDToken = 4,
1314
}
1415

@@ -97,6 +98,7 @@ pub enum Verification {
9798
},
9899
Passphrase(String),
99100
VerificationKey(String),
101+
#[allow(clippy::upper_case_acronyms)]
100102
OIDCIDToken(String),
101103
}
102104

src/verification_methods.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pub enum VerificationMethod {
1414
Email(String),
1515
Passphrase,
1616
VerificationKey,
17+
#[allow(clippy::upper_case_acronyms)]
1718
OIDCIDToken,
1819
}
1920

@@ -24,6 +25,7 @@ enum CMethodType {
2425
Email = 1,
2526
Passphrase = 2,
2627
VerificationKey = 3,
28+
#[allow(clippy::upper_case_acronyms)]
2729
OIDCIDToken = 4,
2830

2931
#[num_enum(default)]

tests/identity/test_app.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![allow(dead_code)] // This module is compiled per-test. Not all tests will use all functions!
22

33
mod config;
4-
use config::{Config, OIDCConfig};
4+
use config::{Config, OidcConfig};
55

66
use super::Admin;
77
use super::App;
@@ -119,7 +119,7 @@ impl TestApp {
119119
Ok(tanker)
120120
}
121121

122-
pub fn get_oidc_config(&self) -> &OIDCConfig {
122+
pub fn get_oidc_config(&self) -> &OidcConfig {
123123
&self.config.oidc_config
124124
}
125125
}

tests/identity/test_app/config.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ fn safe_get_env(env_var: &str) -> String {
99
}
1010

1111
#[derive(Debug, Clone)]
12-
pub struct OIDCUser {
12+
pub struct OidcUser {
1313
pub email: String,
1414
pub refresh_token: String,
1515
}
1616

1717
#[derive(Debug, Clone)]
18-
pub struct OIDCConfig {
18+
pub struct OidcConfig {
1919
pub client_id: String,
2020
pub client_secret: String,
2121
pub provider: String,
22-
pub users: HashMap<String, OIDCUser>,
22+
pub users: HashMap<String, OidcUser>,
2323
}
2424

2525
#[derive(Debug, Clone)]
@@ -28,7 +28,7 @@ pub struct Config {
2828
pub api_url: String,
2929
pub trustchain_url: String,
3030
pub admin_url: String,
31-
pub oidc_config: OIDCConfig,
31+
pub oidc_config: OidcConfig,
3232
}
3333

3434
impl Config {
@@ -38,12 +38,12 @@ impl Config {
3838
api_url: safe_get_env("TANKER_APPD_URL"),
3939
trustchain_url: safe_get_env("TANKER_TRUSTCHAIND_URL"),
4040
admin_url: safe_get_env("TANKER_ADMIND_URL"),
41-
oidc_config: OIDCConfig::new(),
41+
oidc_config: OidcConfig::new(),
4242
}
4343
}
4444
}
4545

46-
impl OIDCConfig {
46+
impl OidcConfig {
4747
pub fn new() -> Self {
4848
Self {
4949
client_id: safe_get_env("TANKER_OIDC_CLIENT_ID"),
@@ -52,14 +52,14 @@ impl OIDCConfig {
5252
users: vec![
5353
(
5454
"martine".into(),
55-
OIDCUser {
55+
OidcUser {
5656
email: safe_get_env("TANKER_OIDC_MARTINE_EMAIL"),
5757
refresh_token: safe_get_env("TANKER_OIDC_MARTINE_REFRESH_TOKEN"),
5858
},
5959
),
6060
(
6161
"kevin".into(),
62-
OIDCUser {
62+
OidcUser {
6363
email: safe_get_env("TANKER_OIDC_KEVIN_EMAIL"),
6464
refresh_token: safe_get_env("TANKER_OIDC_KEVIN_REFRESH_TOKEN"),
6565
},

0 commit comments

Comments
 (0)