feat(webfinger): support desktop and mobile specific OIDC client_id

This commit is contained in:
pat-s
2026-02-17 10:41:35 +01:00
committed by Ralf Haferkamp
parent 84da592c88
commit daeae1f443
3 changed files with 69 additions and 8 deletions
+14 -2
View File
@@ -124,7 +124,12 @@ func getRelationProviders(cfg *config.Config) (map[string]service.RelationProvid
case relations.OpenIDConnectDesktopRel:
// Handled below - can also be auto-enabled via DesktopIDP config
if cfg.DesktopIDP != "" {
rels[relationURI] = relations.OpenIDDiscoveryDesktop(cfg.DesktopIDP)
rels[relationURI] = relations.OpenIDDiscoveryDesktop(cfg.DesktopIDP, cfg.DesktopClientID)
}
case relations.OpenIDConnectMobileRel:
// Handled below - can also be auto-enabled via MobileIDP config
if cfg.MobileIDP != "" {
rels[relationURI] = relations.OpenIDDiscoveryMobile(cfg.MobileIDP, cfg.MobileClientID)
}
case relations.OpenCloudInstanceRel:
var err error
@@ -143,7 +148,14 @@ func getRelationProviders(cfg *config.Config) (map[string]service.RelationProvid
// See: https://github.com/opencloud-eu/desktop/issues/246
if cfg.DesktopIDP != "" {
if _, exists := rels[relations.OpenIDConnectDesktopRel]; !exists {
rels[relations.OpenIDConnectDesktopRel] = relations.OpenIDDiscoveryDesktop(cfg.DesktopIDP)
rels[relations.OpenIDConnectDesktopRel] = relations.OpenIDDiscoveryDesktop(cfg.DesktopIDP, cfg.DesktopClientID)
}
}
// Auto-enable mobile OIDC issuer when MobileIDP is configured
if cfg.MobileIDP != "" {
if _, exists := rels[relations.OpenIDConnectMobileRel]; !exists {
rels[relations.OpenIDConnectMobileRel] = relations.OpenIDDiscoveryMobile(cfg.MobileIDP, cfg.MobileClientID)
}
}