diff --git a/admin-ui/pom.xml b/admin-ui/pom.xml
deleted file mode 100644
index 641b32f..0000000
--- a/admin-ui/pom.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
- 4.0.0
-
- com.xwiki.integration-azure-oauth
- integration-azure-oauth-parent
- 1.9.1-SNAPSHOT
-
-
- integration-azure-oauth-admin-ui
- xar
-
- Administration Classes for Microsoft Azure Active Directory Single Sign-On (SSO) (pro)
- This extension supports the authentication to the wiki using Azure Active Directory
-
-
-
- Configuration Pages for Microsoft Azure Active Directory Single Sign-On (SSO) (Pro)
-
- true
- true
- other
-
-
- AzureADAdmin.WebHome
-
-
- AzureADAdmin.AzureADConfig
-
-
-
-
-
- com.xwiki.licensing
- application-licensing-licensor-api
- ${licensing.version}
-
-
- com.xwiki.integration-azure-oauth
- integration-azure-oauth-api
- ${project.version}
-
-
- com.xwiki.identity-oauth
- identity-oauth-ui
- ${identity.oauth.version}
- xar
-
-
-
diff --git a/admin-ui/src/main/resources/AzureADAdmin/AzureADConfigClass.xml b/admin-ui/src/main/resources/AzureADAdmin/AzureADConfigClass.xml
deleted file mode 100644
index 9dc7a6f..0000000
--- a/admin-ui/src/main/resources/AzureADAdmin/AzureADConfigClass.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
- AzureADAdmin
- AzureADConfigClass
-
-
- 0
- xwiki:XWiki.Admin
- xwiki:AzureADAdmin.WebHome
- xwiki:XWiki.Admin
- xwiki:XWiki.Admin
- 1.1
-
-
- false
- xwiki/2.1
- true
-
-
- AzureADAdmin.AzureADConfigClass
-
-
-
-
-
-
-
-
-
- 0
- tenantid
- 1
- 0
- tenant id
- 60
- 0
-
-
- com.xpn.xwiki.objects.classes.StringClass
-
-
-
diff --git a/admin-ui/src/main/resources/AzureADAdmin/AzureADConfigSheet.xml b/admin-ui/src/main/resources/AzureADAdmin/AzureADConfigSheet.xml
deleted file mode 100644
index 146c9c0..0000000
--- a/admin-ui/src/main/resources/AzureADAdmin/AzureADConfigSheet.xml
+++ /dev/null
@@ -1,178 +0,0 @@
-
-
-
-
-
- AzureADAdmin
- AzureADConfigSheet
-
-
- 0
- xwiki:XWiki.Admin
- AzureADAdmin.WebHome
- xwiki:XWiki.Admin
- xwiki:XWiki.Admin
- 1.1
- #if($doc.fullName=="AzureADAdmin.AzureADConfigSheet")Azure AD Config Sheet#else $doc.title #end
-
- false
- xwiki/2.1
- true
- {{include reference="IdentityOAuth.IdentityOAuthConfigMacros" /}}
-
-{{velocity output="false"}}
-#macro (getLinkTranslations $registrationHint $documentationHint $outlookHint)
- ## Register for OAuth access on the Microsoft Azure portal.
- #getTranslation('communicate.hint.linkLabel', 'xml', $translation)
- #set ($portalLink = 'https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps')
- #set ($registrationLink = "<a href='${portalLink}'>${translation}</a>")
- #tp('communicate.hint', ['__LINK__'], 'xml', $translation)
- #set ($registrationHint = $translation.replace('__LINK__', $registrationLink))
- ## Installation instruction.
- #getTranslation('communicate.hint2.linkLabel', 'xml', $translation)
- #set ($documentationLink = "<a href='${productPage}#documentation'>${translation}</a>")
- #tp('communicate.hint2', ['__LINK__'], 'xml', $translation)
- #set ($documentationHint = $translation.replace('__LINK__', $documentationLink))
- ## Use outlook for avatars.
- #getTranslation('scope_avatar.onlyOutlook.linkLabel', 'xml', $translation)
- #set ($outlookLink =
- "<a href='https://docs.microsoft.com/en-us/graph/known-issues#photo-restrictions'>${translation}</a>")
- #tp('scope_avatar.onlyOutlook', ['__LINK__'], 'xml', $translation)
- #set ($outlookHint = $translation.replace('__LINK__', "${outlookLink}"))
-#end
-{{/velocity}}
-
-{{velocity}}
-#if(!$xwiki.hasAdminRights())
- Admin rights are needed.
-#else
- ## defines formId, propNamePrefixIO, configDoc, objIO, objO
- ## #set($configDocName="AzureAD.AzureADConfig")
- ## set($providerHint = "AzureAD")
- ## #set($productPage = "https://store.xwiki.com/xwiki/bin/view/Extension/AzureADIntegration")
- #initConfigObjects(${configDocName}, ${extraObjectClassPropPrefixes}, ${translationPrefix})
- ## use stylesheet and JavaScript extensions
- #ioIncludeUIX()
- #getLinkTranslations($registrationHint $documentationHint $outlookHint)
- {{html clean="false" wiki=false}}
- <script>window.identityOAuthProvider = "${providerHint}";</script>
- <p>#t('config.explanation')</p>
-
- <form id="$formId" method="post" action="$xwiki.getURL($configDoc, 'saveandcontinue')" class="xform">
- <dl>
- <dt>#displayInput ("active", $objIO) <label for="${propNamePrefixIO}_active">#t ("active")</label></dt>
- <dd></dd>
- </dl>
-
- <fieldset>
- <legend>#t ('communicate')</legend>
-
- <dl>
- <dt><span class="xHint">
- $registrationHint<br>
- $documentationHint</span>
- </dt>
- <dd></dd>
- <dt><label for="${propNamePrefixIO}_clientid">#t ('clientid')</label>
- <span class="xHint">#t ("clientid.hint")</span></dt>
- <dd> #displayInput ('clientid', $objIO)</dd>
-
- <dt><label for="${propNamePrefixIO}_secret">#t ('secret')</label>
- <span class="xHint">#t("secret.hint")</span></dt>
- <dd> #displayInput ("secret", $objIO)</dd>
-
- #foreach($x in $extraObjectClassPropPrefixes)
- <dt><label for="${x[2]}_0_${x[1]}">#t ($x[1])</label>
- <span class="xHint">#t ("${x[1]}.hint")</span></dt>
- <dd> #displayInput ("${x[1]}", $x[0])</dd>
- #end
-
- <dt><label for="${propNamePrefixIO}_redirectUrl">#t ('redirectUrl')</label>
- <span class="xHint">#t ("redirectUrl.hint")</span>
- </dt>
- #*
- Four cases:
- - redirectUrl browsers' matches servers'
- - 1) value as expected
- - redirectUrl browsers' unequal servers'
- - 2) value as browser's
- - 3) value as server's
- - 4) independent
- *#
- #calcReturnUrlsJS()
- <dd> #renderRedirectUrlInputAndHints()
- </dd>
-
- ## checkboxes for scope, needs JS
- <dt><label>#t ('scope')</label>
- <span class="xHint">#t ('scope.hint')</span></dt>
- <dd>
- <label title="#t ('checkbox_mandatory')">
- <input type="checkbox" name="scope_openid " disabled="true" checked class="mandatory">#t ('scope_identity')</label>
- <label title="#t ('checkbox_mandatory')">
- <input type="checkbox" name="scope_User.Read" disabled="true" checked class="mandatory">#t ("scope_email")</label><br/>
- <label title="#t('checkbox_notyetdone')">
- <input type="checkbox" name="scope_User.ReadBasic.All">#t ('scope_avatar')</label>
- #set($p=$configDocName.length()+1)
- <input type="hidden" name="${propNamePrefixIO.substring($p)}_scope" value="${objIO.getValue('scope')}"/>
- ($outlookHint)
- </dd>
- </dl>
- </fieldset>
-
- ## <fieldset>
- ## <legend>#t ('loginbehaviour')</legend>
-
- ## <dl>
- ## TODO: add domains' limitation
-
- ## TODO: add cookie's support
- ## </dl>
- ## </fieldset>
-
-
- ## Hidden form elements
- #set ($params = "editor=${escapetool.url(${editor})}&section=${escapetool.url(${section})}")
- #set ($params = "${params}&space=${escapetool.url(${currentSpace})}")
- #set ($continueURL = $xwiki.getURL($currentDoc, 'admin', $params))
- <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}"/>
- <input type="hidden" name="xcontinue" value="${continueURL}"/>
- <input type="hidden" name="xredirect" value="${continueURL}"/>
-
- ## submit
- <div class="bottombuttons">
- <p><span id="warningIncomplete">#t("warningIncomplete")</span> </p>
- <p class="admin-buttons">
- <span class="buttonwrapper">
- <input class="button" type="submit" name="formactionsac"
- value="$escapetool.xml($services.localization.render('admin.save'))"/>
- </span>
- </p>
- </div>
- </form>
- <div id="appOnNowWhat">
- <p>#t ('nowWhat1')</p>
- <p>#t ('nowWhat2')</p>
- </div>
-#end
-{{/html}}
-{{/velocity}}
-
diff --git a/admin-ui/src/main/resources/AzureADAdmin/Install.xml b/admin-ui/src/main/resources/AzureADAdmin/Install.xml
deleted file mode 100644
index 71349e4..0000000
--- a/admin-ui/src/main/resources/AzureADAdmin/Install.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
-
- AzureADAdmin
- Install
-
-
- 0
- xwiki:XWiki.Admin
- AzureADAdmin.WebHome
- xwiki:XWiki.Admin
- xwiki:XWiki.Admin
- 1.1
- AzureADAdmin Installation
-
- false
- xwiki/2.0
- true
- {{velocity}}
-#if(!$xwiki.hasAdminRights())
- You are running this script as a non admin. It will have no effect. Login as admin.
-#else
- This script automatically sets the owner of the pages in the AzureADAdmin Application.
- This will allow the priviledged scripts included in them to work.
-#end
-#if($request.confirm=="1")
- Assigning programming rights to the following pages:
-#else
- [[Confirm assigning programming rights to the following pages:>>$doc.fullName?confirm=1]]
-#end
-
-#foreach($item in $xwiki.searchDocuments("where doc.web='AzureADAdmin'"))
-* $item #if($request.confirm=="1") $xwiki.getDocument($item).save() #end
-
-#end
-
-#set($transdoc = $xwiki.getDocument("XWiki.XWikiPreferences"))
-#set($ok = $transdoc.setTitle($transdoc.getTitle()))
-#set($ok = $transdoc.use("XWiki.XWikiPreferences"))
-#set($transprefs = $transdoc.getValue("documentBundles"))
-#if($transprefs.indexOf("AzureADAdmin.Translations")==-1)
- #if($request.confirm=="1")
- #set($transprefs = "${transprefs},AzureADAdmin.Translations")
- #set($ok = $transdoc.set("documentBundles", $transprefs))
- #set($ok = $transdoc.save())
- #end
-* Added translation bundle to XWiki Preferences
-#end
-{{/velocity}}
-
diff --git a/admin-ui/src/main/resources/AzureADAdmin/Translations.de.xml b/admin-ui/src/main/resources/AzureADAdmin/Translations.de.xml
deleted file mode 100644
index fdb1c38..0000000
--- a/admin-ui/src/main/resources/AzureADAdmin/Translations.de.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
- AzureADAdmin
- Translations
- de
- en
- 1
- xwiki:XWiki.Admin
- AzureADAdmin.WebHome
- xwiki:XWiki.Admin
- xwiki:XWiki.Admin
- 1.1
- AzureADAdmin Translations (Deutsch/German)
-
- false
- plain/1.0
- true
- admin.azureAD=Azure AD
-# Login page
-azureADAdmin.loginWithAzureAD = Login mit Azure Active Directory
-
-# Admin (extras compared to IdentityOAuth/Translations
-azureADAdmin.config.heading=AzureAD Integration
-azureADAdmin.AzureADConfigClass_config.explanation=XWiki kann die Benutzer von eines Azure Active Directory Installation erkennen.
-azureAD.extension.name=Microsoft Azure Active Directory Single Sign-On (SSO) (Pro)
-
-azureADAdmin.AzureADConfigClass_communicate=Verbindungen mit den Diensten von Azure Active Directory
-azureADAdmin.AzureADConfigClass_communicate.hint=Damit Sie Azure AD Integration aktivieren können, brauchen Sie {0} und die Kundenidentifizierung, Halteridentifizierung und Geheimschlüssel hier einfügen.
-azureADAdmin.AzureADConfigClass_communicate.hint.linkLabel=eine OAuth Applikation für OAuth Zugang bei der Microsoft Azure Console registrieren
-azureADAdmin.AzureADConfigClass_communicate.hint2=Sie erhalten mehr Information dazu bei den {0}.
-azureADAdmin.AzureADConfigClass_communicate.hint2.linkLabel=Installationsanweisungen
-
-azureADAdmin.AzureADConfigClass_tenantid=Halteridentifikator (Tenant-ID)
-azureADAdmin.AzureADConfigClass_tenantid.hint=In dem Übersicht von Azure zu finden.
-
-
-azureADAdmin.AzureADConfigClass_nowWhat1=Nachdem du die Konfiguration zu Ende geführt hast, solltest du ein Log-out und Log-in machen, indem du auf "Login mit Azure Active Directory" klickst.\
-azureADAdmin.AzureADConfigClass_nowWhat2=Im Fall von technische Schwierigkeiten kann das XWiki Support helfen, support@xwikisas.com.
-
-## a single change for avatar's setting
-azureADAdmin.AzureADConfigClass_scope_avatar.onlyOutlook = Diese Funktion ist nur aktiv mit Konten, die Outlook benutzen können, eine {0}bekannte{1} Begrenzung
-
-
diff --git a/admin-ui/src/main/resources/AzureADAdmin/Translations.fr.xml b/admin-ui/src/main/resources/AzureADAdmin/Translations.fr.xml
deleted file mode 100644
index b7f12a0..0000000
--- a/admin-ui/src/main/resources/AzureADAdmin/Translations.fr.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
- AzureADAdmin
- Translations
- fr
- en
- 1
- xwiki:XWiki.Admin
- AzureADAdmin.WebHome
- xwiki:XWiki.Admin
- xwiki:XWiki.Admin
- 1.1
- Azure AD Translations (Français/French)
-
- false
- plain/1.0
- true
- admin.azureAD=Azure AD
-# Login page
-azureADAdmin.loginWithAzureAD = Connexion avec Azure Active Directory
-
-# Admin (extras compared to IdentityOAuth/Translations
-azureADAdmin.config.heading=Configuration de AzureAD
-azureADAdmin.AzureADConfigClass_config.explanation=XWiki peut être intégré pour permettre la connexion des utilisateurs en utilisant ceux d'Azure Active Directory.
-azureAD.extension.name=Microsoft Azure Active Directory Single Sign-On (SSO) (Pro)
-
-azureADAdmin.AzureADConfigClass_communicate=Communication avec les services Azure Active Directory
-azureADAdmin.AzureADConfigClass_communicate.hint=Pour activer l''intégration Azure AD vous devez {0} and insérer ici votre identifiant de client, de locataire (tenant) et la clé-secrete.
-azureADAdmin.AzureADConfigClass_communicate.hint.linkLabel=enregistrez une application OAuth sur la console Azure
-azureADAdmin.AzureADConfigClass_communicate.hint2=Pour plus d''informations, veuillez vous référer aux {0}.
-azureADAdmin.AzureADConfigClass_communicate.hint2.linkLabel=instructions d''installation
-
-azureADAdmin.AzureADConfigClass_tenantid=Identifiant de locataire (tenant-ID)
-azureADAdmin.AzureADConfigClass_tenantid.hint=Ainsi que fourni dans la vue d'ensemble Azure
-
-
-azureADAdmin.AzureADConfigClass_nowWhat1=Une fois la configuration effectuée et enregistrée, veuillez vous déconnecter et vous connecter en cliquant "Connexion avec Azure Active Directory".
-azureADAdmin.AzureADConfigClass_nowWhat2=Si vous avez des difficultés, veuillez contacter le support technique support@xwikisas.com .
-
-## a single change for avatar's setting
-azureADAdmin.AzureADConfigClass_scope_avatar.onlyOutlook = ne fonctionne qu''avec les comptes licensiés pour l''usage de'Outlook, une {0}limitation connue{1}
-
-
diff --git a/admin-ui/src/main/resources/AzureADAdmin/WebHome.xml b/admin-ui/src/main/resources/AzureADAdmin/WebHome.xml
deleted file mode 100644
index 40773c8..0000000
--- a/admin-ui/src/main/resources/AzureADAdmin/WebHome.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
- AzureADAdmin
- WebHome
-
-
- 0
- xwiki:XWiki.Admin
- xwiki:Main.WebHome
- xwiki:XWiki.Admin
- xwiki:XWiki.Admin
- 1.1
- Microsoft Azure Active Directory Single Sign-On (SSO)
-
- false
- xwiki/2.1
- true
- {{velocity}}
-#set ($reference = $services.model.createDocumentReference("xwiki", ["AzureADAdmin"], "WebPreferences"))
-#if (!$services.licensing.licensor.hasLicensureForEntity($references))
- {{missingLicenseMessage extensionName="azureAD.extension.name"/}}
-#else
-This space contains the administration code for the Azure Active Directory Integration of XWiki.
- This extensions currently allows users to login with XWiki by authorizing the transmission
- of profile information from an Azure Active Directory node. It uses the OAuth protocol
- and, thus, the OpenID basic derivative.
- #end
-{{/velocity}}
-
diff --git a/api/pom.xml b/api/pom.xml
index fe65691..5829db6 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -28,8 +28,8 @@
integration-azure-oauth-api
jar
- Microsoft Azure Active Directory Single-Sign-On (SSO) (pro) API
- This extension allows users to authenticate to the wiki using Azure Active Directory
+ Microsoft Entra ID SSO API
+ This extension allows users to authenticate to the wiki using Entra ID, formerly known as Azure Active Directory.
@@ -52,21 +52,20 @@
javax.servlet-api
provided
-
- com.xwiki.identity-oauth
- identity-oauth-api
- ${identity.oauth.version}
-
org.xwiki.platform
xwiki-platform-configuration-default
${platform.version}
- org.xwiki.commons
- xwiki-commons-tool-test-component
- ${commons.version}
- test
+ org.xwiki.contrib.oidc
+ oidc-authenticator
+ 2.13.4-SNAPSHOT
+
+
+ org.xwiki.platform
+ xwiki-platform-rest-server
+ ${platform.version}
org.xwiki.platform
@@ -78,5 +77,11 @@
xwiki-platform-refactoring-api
${platform.version}
+
+ org.xwiki.commons
+ xwiki-commons-tool-test-component
+ ${commons.version}
+ test
+
diff --git a/api/src/main/java/com/xwiki/azureoauth/AzureADIdentityOAuthProvider.java b/api/src/main/java/com/xwiki/azureoauth/AzureADIdentityOAuthProvider.java
deleted file mode 100644
index e80ab7b..0000000
--- a/api/src/main/java/com/xwiki/azureoauth/AzureADIdentityOAuthProvider.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
- * See the NOTICE file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package com.xwiki.azureoauth;
-
-import java.io.InputStream;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Provider;
-import javax.inject.Singleton;
-
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.commons.lang3.tuple.Triple;
-import org.slf4j.Logger;
-import org.xwiki.component.annotation.Component;
-import org.xwiki.extension.ExtensionId;
-import org.xwiki.model.reference.DocumentReference;
-import org.xwiki.model.reference.DocumentReferenceResolver;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.xpn.xwiki.doc.XWikiDocument;
-import com.xwiki.identityoauth.IdentityOAuthException;
-import com.xwiki.identityoauth.IdentityOAuthManager;
-import com.xwiki.identityoauth.IdentityOAuthProvider;
-import com.xwiki.identityoauth.internal.IdentityOAuthConstants;
-import com.xwiki.licensing.Licensor;
-
-/**
- * A provider to read identity based on OAuth/OpenID from Microsoft Azure Active Directory.
- *
- * @version $Id$
- * @since 1.0
- */
-@Component
-@Named("AzureAD")
-@Singleton
-public class AzureADIdentityOAuthProvider implements IdentityOAuthProvider
-{
- private static final String TENANT_ID = "tenantid";
-
- private static final String PROVIDERHINT = "AzureAD";
-
- private static final String EXCEPTIONUNLICENSED = "This extension is not licensed.";
-
- @Inject
- protected DocumentReferenceResolver documentResolver;
-
- @Inject
- protected Logger logger;
-
- @Inject
- protected Provider licensorProvider;
-
- @Inject
- protected Provider identityOAuthManager;
-
- protected DocumentReference configPageRef;
-
- @Inject
- private AzureADOAuthClient oauthClient;
-
- private ExtensionId thisExtensionId =
- new ExtensionId("com.xwiki.integration-azure-oauth:integration-azure-oauth-ui");
-
- private List scopes;
-
- private boolean active;
-
- private String tenantId;
-
- private ThreadLocal currentlyRequestedUrl = new ThreadLocal<>();
-
- private ThreadLocal