Google Apps Application

Last modified by Roman Oli on 2022/04/25 00:04

cogThis extension allows to connect Google Apps to XWiki
TypeXAR
Category
Developed by

Ludovic Dubost (XWiki SAS)

Active Installs32
Rating
1 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

You can also try the Pro version Google Apps Integration (Pro) which offers further improvements and bugfixes including fixes for Restrict domain for users to login doesn't work and missing People API blocker issues.

This is the distribution for the Google Apps extension, allowing to integrate XWiki with Google's editing application (Google Docs, Spreadsheet, Presentations and Drawing). Thanks to this application it is possible to easily import a Google Apps document as an attachment in XWiki (in multiple formats) and also to launch editing of an XWiki attachment in Google Apps. Once your editing session is finished you can reimport it in XWiki.

This integration uses the OAuth2 protocol to connect Google Apps with XWiki. It works with individual Google accounts as well as company wide Google Apps accounts.

The configuration of the application is available on the wiki Administration under the "Applications" section:
ApplicationConfiguration.png

To activate Google Apps you need to register for OAuth access on Google.com and next insert your domain name and key in the settings from the wiki Administration section "Google Apps". You will find more information about registration in Google's registration documentation.

Activate Google Authentication

To activate the Groovy Authentication you need to update the following settings in xwiki.cfg:
xwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.GroovyAuthServiceImpl
xwiki.authentication.groovy.pagename=xwiki:GoogleApps.AuthService 

Once you have properly configured the application, you will be able to see the feature in the Attachments section of XWiki pages. You can either click on the edit link next to each attachment or use the "Import from Google Apps" button.

googleapps.png

Once you have properly configured the application, you will be able to see the feature in the Attachments section of XWiki pages. You can either click on the edit link next to each attachment or use the "Import from Google Apps" button.

You can also use the "drive" macro to insert (embed) a Google Document in your page.
googlemacro.png
searchfordocument.png

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

To use this feature you will first need to generated OAuth2 credentials on the Google Developer Console and obtain a secret key for the OAuth authentication integration. You will need to configure these keys in the Google Apps section of the XWiki Preferences

To activate the Groovy Authentication you need to update the following settings in xwiki.cfg:
xwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.GroovyAuthServiceImpl
xwiki.authentication.groovy.pagename=xwiki:GoogleApps.AuthService 

You can verify your installation by visiting the page TestDocumentList, which should list you 10 documents of your Google Docs instance.

The experimental Sync page requires a service accounts, created following this documentation and the certificate named GoogleApps.p12 saved into the WEB-INF directory

Release Notes

v2.1.6

  • Fix when users login with non authorized account to allow to relogin with the proper one
  • Add a more detailed message when people login with non authorized account

v2.1.4

  • Add auto login with cookie feature, two ways :
    • Skip the login page and redirect directly to the google authentification page
    • Authenticate using user value stored in the cookie
  • Added the foolowing parameter according to this feature :
    • Enable the use of cookies
    • (Need Cookies enabled) Skip login page 
    • (Need Cookies enabled) Allow authentication with cookie - skip google if already logged one time
    • (Need Cookies enabled) Cookies Time To Live in seconds - default : 3 days

v2.1.3

  • Allow to restrict login to a specific domain

v2.1.2

  • Fix edit rights missing for user on their own profile after user creation
  • Fix first name and last name update

v2.1.1

  • Google login will work without installing the app on subwikis
  • The Application works with global users only
  • Fixed wrong authentification after first login and user creation

v2.1

Added Login with Google. This feature requires:

  • Added the Google Plus API to your OAuth credentials in the Google Developer Console
  • Activating the Groovy Authenticator in xwiki.cfg:
xwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.GroovyAuthServiceImpl
xwiki.authentication.groovy.pagename=xwiki:GoogleApps.AuthService 

To not use this feature, deactivate the Login Javascript Extension in the page GoogleApps.LoginExtension

v2.0.2

  • Uploading to Google is now supported
  • Experimental sync using service accounts has been added (Sync page)

The Sync page requires a service accounts, created following this documentation and the certificate named GoogleApps.p12 saved into the WEB-INF directory

v2.0.1

  • Fixed authentication system bug when reauthenticating
  • Added drive macro "edit" link

v2.0

  • Initial release of the new version of the Google Apps module
  • Support oauth2 (oauth1 is deprecated by Google)
  • Added Drive Macro to embed google documents

Notes:

  • Uploading to Google for editing is not yet supported as in the previous extension.

Dependencies

Dependencies for this extension (org.xwiki.contrib:application-googleapps 2.1.8):

  • com.google.api-client:google-api-client 1.20.0
  • com.google.gdata:core 1.47.1
  • com.google.apis:google-api-services-plus v1-rev318-1.20.0
  • com.google.apis:google-api-services-drive v2-rev174-1.20.0
Tags:
    

Get Connected