Open Source | Technology

Logging on to Alfresco Share using a Google Apps account

Alfresco Share OAuth SSO Support

The Alfresco OAuth SSO module lets users login in Alfresco Share using their Google Apps account. The module automatically creates accounts which do not exist to make Share and Google Apps integrate seamlessly. The configuration uses standard Share Surf configuration files. The jar is packaged with all dependencies so that it can be deployed as a single jar.

The extension is available on Github:

Please let us know if you have any questions in the comments section.


I. Create a Google API access

Go to Google API Console and create your API (

II. Deploy the library

Copy the oauth-login-module jar in your Share webapp lib folder ([$WEBAPP_FOLDER]/share/WEB-INF/lib).

III. Add the filter to web.xml

Add the following snippet to your Share web.xml before the filter named “Authentication filter”

 <description>Oauth Authentication Support</description> 

and add the following filter-mappings before the “Authentication Filter” mappings


IV. Configure the OAuth filter. Add the following configuration to the share-config-custom.xml file. This file generally stands in the external configuration directory of Share. In the standard tomcat installation, the Share external configuration is located in tomcat/shared/classes/alfresco/web-extension directory.

Example of the configuration:

 <config evaluator="string-compare" condition="OAuthFilter"> 
 <!-- the condition must always be OAuthFilter -->
 <!-- The host of the Alfresco repository webapp --> 
 <!-- The port of the Alfresco repository webapp. Put 80 for standard HTTP--> 
 <!-- The protocol to access the Alfresco repository --> 
 <!-- The API access URI. If you use standard Alfresco, this should not change --> 
 <!-- The admin user who is able to create new users --> 
 <!-- The password of the admin user --> 
 <!-- The unique password for all users authenticated with OAuth. Choose one very complex --> 
 <!-- The domains for which incoming user should be restricted to. 
 If left blank, any valid email will be accepted --> 
 <!-- The key of your API application --> 
 <!-- The URI from which get the user profile informations --> 
 <!-- The secret of your API application --> 
 <!-- The scope(s) for getting data --> 
 <!-- This is a constant and my be different in future releases -->  

Build notes

The standard package build generates a shaded jar with dependencies included for easier deployment.

The Maven has a webapp profile which builds an exploded share war. Running the “integration-test” launches the embedded jetty server with a custom web.xml and the filter deployed.


Print this post

2 Responses to "Logging on to Alfresco Share using a Google Apps account"

  1. Michelle Tebbutson   on Wednesday, February 5

    Where is oauth-login-module.jar ?

  2. Luis   on Friday, March 21

    hi…i downloaded share-oauth-2.2
    put it to share/WEB-INF/lib
    created my own project on google and i get my key
    added to web.xml

    Oauth Authentication Support

    Share SSO authentication support filter.
    Authentication Filter





    Authentication Filter

    also added to share-config-custom – changed only the key
    but there is an error
    The requested resource () is not available.
    what i did worng???


Reply to Luis

Get latest news