mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 12:46:49 +00:00
feat(oidc): Show the provider's name and icon on the login page
This commit is contained in:
1 parent
0060a4aac4
commit
fe38efbb63
7 files changed
+75
-5
No files matched your search
@@ -219,6 +219,18 @@ impl Service {
|
||||
|
||||
pub fn enabled(&self) -> bool { self.client.is_some() }
|
||||
|
||||
pub fn provider_name(&self) -> Option<String> {
|
||||
let OidcClient { config, .. } = self.client.as_ref().expect("oidc should be configured");
|
||||
|
||||
config.provider_name.clone()
|
||||
}
|
||||
|
||||
pub fn provider_icon(&self) -> Option<Url> {
|
||||
let OidcClient { config, .. } = self.client.as_ref().expect("oidc should be configured");
|
||||
|
||||
config.provider_icon.clone()
|
||||
}
|
||||
|
||||
pub fn restricted_profile_fields(&self) -> Vec<ProfileFieldName> {
|
||||
if let Some(config) = self.client.as_ref().map(|client| &client.config)
|
||||
&& matches!(config.profile_key_import_mode, OidcProfileKeyImportMode::OnLogin)
|
||||
|
||||
Reference in new issue
Block a user