Skip to content

Commit d01bc5c

Browse files
committed
chore(oauth): add thundermail/tb.pro oauth configuration
1 parent e426ea3 commit d01bc5c

File tree

6 files changed

+150
-0
lines changed

6 files changed

+150
-0
lines changed

app-k9mail/src/debug/kotlin/app/k9mail/auth/K9OAuthConfigurationFactory.kt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class K9OAuthConfigurationFactory : OAuthConfigurationFactory {
1313
createGmailConfiguration(),
1414
createMicrosoftConfiguration(),
1515
createYahooConfiguration(),
16+
createThundermailConfiguration(),
17+
createThundermailStageConfiguration(),
1618
)
1719
}
1820

@@ -89,4 +91,27 @@ class K9OAuthConfigurationFactory : OAuthConfigurationFactory {
8991
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
9092
)
9193
}
94+
95+
private fun createThundermailConfiguration(): Pair<List<String>, OAuthConfiguration> =
96+
listOf(
97+
"mail.tb.pro",
98+
"mail.thundermail.com",
99+
) to OAuthConfiguration(
100+
clientId = "mobile-android-k9mail",
101+
scopes = listOf("openid", "profile", "email", "offline_access"),
102+
authorizationEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/auth",
103+
tokenEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/token",
104+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
105+
)
106+
107+
private fun createThundermailStageConfiguration(): Pair<List<String>, OAuthConfiguration> =
108+
listOf(
109+
"mail.stage-thundermail.com",
110+
) to OAuthConfiguration(
111+
clientId = "mobile-android-k9mail",
112+
scopes = listOf("openid", "profile", "email", "offline_access"),
113+
authorizationEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/auth",
114+
tokenEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/token",
115+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
116+
)
92117
}

app-k9mail/src/release/kotlin/app/k9mail/auth/K9OAuthConfigurationFactory.kt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class K9OAuthConfigurationFactory : OAuthConfigurationFactory {
1313
createGmailConfiguration(),
1414
createMicrosoftConfiguration(),
1515
createYahooConfiguration(),
16+
createThundermailConfiguration(),
17+
createThundermailStageConfiguration(),
1618
)
1719
}
1820

@@ -89,4 +91,27 @@ class K9OAuthConfigurationFactory : OAuthConfigurationFactory {
8991
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
9092
)
9193
}
94+
95+
private fun createThundermailConfiguration(): Pair<List<String>, OAuthConfiguration> =
96+
listOf(
97+
"mail.tb.pro",
98+
"mail.thundermail.com",
99+
) to OAuthConfiguration(
100+
clientId = "mobile-android-k9mail",
101+
scopes = listOf("openid", "profile", "email", "offline_access"),
102+
authorizationEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/auth",
103+
tokenEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/token",
104+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
105+
)
106+
107+
private fun createThundermailStageConfiguration(): Pair<List<String>, OAuthConfiguration> =
108+
listOf(
109+
"mail.stage-thundermail.com",
110+
) to OAuthConfiguration(
111+
clientId = "mobile-android-k9mail",
112+
scopes = listOf("openid", "profile", "email", "offline_access"),
113+
authorizationEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/auth",
114+
tokenEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/token",
115+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
116+
)
92117
}

app-thunderbird/src/beta/kotlin/net/thunderbird/android/auth/TbOAuthConfigurationFactory.kt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class TbOAuthConfigurationFactory : OAuthConfigurationFactory {
1313
createGmailConfiguration(),
1414
createMicrosoftConfiguration(),
1515
createYahooConfiguration(),
16+
createThundermailConfiguration(),
17+
createThundermailStageConfiguration(),
1618
)
1719
}
1820

@@ -90,4 +92,27 @@ class TbOAuthConfigurationFactory : OAuthConfigurationFactory {
9092
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
9193
)
9294
}
95+
96+
private fun createThundermailConfiguration(): Pair<List<String>, OAuthConfiguration> =
97+
listOf(
98+
"mail.tb.pro",
99+
"mail.thundermail.com",
100+
) to OAuthConfiguration(
101+
clientId = "mobile-android-thunderbird",
102+
scopes = listOf("openid", "profile", "email", "offline_access"),
103+
authorizationEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/auth",
104+
tokenEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/token",
105+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
106+
)
107+
108+
private fun createThundermailStageConfiguration(): Pair<List<String>, OAuthConfiguration> =
109+
listOf(
110+
"mail.stage-thundermail.com",
111+
) to OAuthConfiguration(
112+
clientId = "mobile-android-thunderbird",
113+
scopes = listOf("openid", "profile", "email", "offline_access"),
114+
authorizationEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/auth",
115+
tokenEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/token",
116+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
117+
)
93118
}

app-thunderbird/src/daily/kotlin/net/thunderbird/android/auth/TbOAuthConfigurationFactory.kt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class TbOAuthConfigurationFactory : OAuthConfigurationFactory {
1313
createFastmailConfiguration(),
1414
createMicrosoftConfiguration(),
1515
createYahooConfiguration(),
16+
createThundermailConfiguration(),
17+
createThundermailStageConfiguration(),
1618
)
1719
}
1820

@@ -89,4 +91,27 @@ class TbOAuthConfigurationFactory : OAuthConfigurationFactory {
8991
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
9092
)
9193
}
94+
95+
private fun createThundermailConfiguration(): Pair<List<String>, OAuthConfiguration> =
96+
listOf(
97+
"mail.tb.pro",
98+
"mail.thundermail.com",
99+
) to OAuthConfiguration(
100+
clientId = "mobile-android-thunderbird",
101+
scopes = listOf("openid", "profile", "email", "offline_access"),
102+
authorizationEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/auth",
103+
tokenEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/token",
104+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
105+
)
106+
107+
private fun createThundermailStageConfiguration(): Pair<List<String>, OAuthConfiguration> =
108+
listOf(
109+
"mail.stage-thundermail.com",
110+
) to OAuthConfiguration(
111+
clientId = "mobile-android-thunderbird",
112+
scopes = listOf("openid", "profile", "email", "offline_access"),
113+
authorizationEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/auth",
114+
tokenEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/token",
115+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
116+
)
92117
}

app-thunderbird/src/debug/kotlin/net/thunderbird/android/auth/TbOAuthConfigurationFactory.kt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class TbOAuthConfigurationFactory : OAuthConfigurationFactory {
1313
createGmailConfiguration(),
1414
createMicrosoftConfiguration(),
1515
createYahooConfiguration(),
16+
createThundermailConfiguration(),
17+
createThundermailStageConfiguration(),
1618
)
1719
}
1820

@@ -90,4 +92,27 @@ class TbOAuthConfigurationFactory : OAuthConfigurationFactory {
9092
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
9193
)
9294
}
95+
96+
private fun createThundermailConfiguration(): Pair<List<String>, OAuthConfiguration> =
97+
listOf(
98+
"mail.tb.pro",
99+
"mail.thundermail.com",
100+
) to OAuthConfiguration(
101+
clientId = "mobile-android-thunderbird",
102+
scopes = listOf("openid", "profile", "email", "offline_access"),
103+
authorizationEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/auth",
104+
tokenEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/token",
105+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
106+
)
107+
108+
private fun createThundermailStageConfiguration(): Pair<List<String>, OAuthConfiguration> =
109+
listOf(
110+
"mail.stage-thundermail.com",
111+
) to OAuthConfiguration(
112+
clientId = "mobile-android-thunderbird",
113+
scopes = listOf("openid", "profile", "email", "offline_access"),
114+
authorizationEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/auth",
115+
tokenEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/token",
116+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
117+
)
93118
}

app-thunderbird/src/release/kotlin/net/thunderbird/android/auth/TbOAuthConfigurationFactory.kt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class TbOAuthConfigurationFactory : OAuthConfigurationFactory {
1313
createFastmailConfiguration(),
1414
createMicrosoftConfiguration(),
1515
createYahooConfiguration(),
16+
createThundermailConfiguration(),
17+
createThundermailStageConfiguration(),
1618
)
1719
}
1820

@@ -89,4 +91,27 @@ class TbOAuthConfigurationFactory : OAuthConfigurationFactory {
8991
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
9092
)
9193
}
94+
95+
private fun createThundermailConfiguration(): Pair<List<String>, OAuthConfiguration> =
96+
listOf(
97+
"mail.tb.pro",
98+
"mail.thundermail.com",
99+
) to OAuthConfiguration(
100+
clientId = "mobile-android-thunderbird",
101+
scopes = listOf("openid", "profile", "email", "offline_access"),
102+
authorizationEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/auth",
103+
tokenEndpoint = "https://auth.tb.pro/realms/tbpro/protocol/openid-connect/token",
104+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
105+
)
106+
107+
private fun createThundermailStageConfiguration(): Pair<List<String>, OAuthConfiguration> =
108+
listOf(
109+
"mail.stage-thundermail.com",
110+
) to OAuthConfiguration(
111+
clientId = "mobile-android-thunderbird",
112+
scopes = listOf("openid", "profile", "email", "offline_access"),
113+
authorizationEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/auth",
114+
tokenEndpoint = "https://auth-stage.tb.pro/realms/tbpro/protocol/openid-connect/token",
115+
redirectUri = "${BuildConfig.APPLICATION_ID}://oauth2redirect",
116+
)
92117
}

0 commit comments

Comments
 (0)