Войдите в Alfresco с учетными данными Google

Я хочу войти в Alfresco Dashboard с учетными данными Google. Я видел пример приложения ниже.

https://github.com/gdepourtales/share-oauth-sso

но это не работает для меня.

Я использую корпоративную версию Alfresco 5.0. Я скачал проект и выполнил все шаги

Я построил упомянутый проект и развернул банки.

Я добавил ниже фрагмент в файл web.xml

<filter>
    <description>Oauth Authentication Support</description>
    <filter-name>OAuthAuthenticationFilter</filter-name>
    <filter-class>ch.gadp.alfresco.OAuthSSOAuthenticationFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>OAuthAuthenticationFilter</filter-name>
    <url-pattern>/page/*</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>OAuthAuthenticationFilter</filter-name>
    <url-pattern>/p/*</url-pattern>
</filter-mapping>

Я добавил приведенную ниже конфигурацию в файл share-config.custom.xml.

<config evaluator="string-compare" condition="OAuthFilter"> <!-- the condition must always be OAuthFilter -->
        <repository>
            <!-- The host of the Alfresco repository webapp -->
            <host>localhost</host>
            <!-- The port of the Alfresco repository webapp. Put 80 for standard HTTP-->
            <port>8081</port>
            <!-- The protocol to access the Alfresco repository -->
            <protocol>http</protocol>
              <!-- The API access URI. If you use standard Alfresco, this should not change -->
            <api>/alfresco/service/api</api>
               <!-- The admin user who is able to create new users -->
            <admin>admin</admin>
            <!-- The password of the admin user -->
            <password>admin</password>
            <!-- The unique password for all users authenticated with OAuth. Choose one very complicated :) -->
            <user-password>gotpxdKFjA_uxzG5SdGu</user-password>
            <!-- The domains for which incoming user should be restricted to. If blank, any valid email will be accepted -->
            <user-domains>nxc.no</user-domains>
        </repository>
        <oauth-api>
            <!-- The key of your API application -->
            <key>my key</key>
            <!-- The URI from which get the user profile informations -->
            <uri>https://www.googleapis.com/oauth2/v1/userinfo</uri>
            <!-- The secret of your API application -->
            <secret>my secret</secret>
            <!-- The scope(s) for getting data -->
            <scope>https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email</scope>
            <!-- This is a constant and my be different in future releases -->
            <name>GoogleApi</name>
        </oauth-api>
    </config>

и я запустил сервер, но я не вижу никаких изменений.

Как я могу узнать процесс входа пользователя в панель инструментов. Поскольку все, что написано в alfresco, является веб-скриптом, как я могу заставить пользователя Google войти в панель инструментов.

Любой ответ мне очень поможет Спасибо!.


comment
Пожалуйста, добавьте вещи, которые вы пробовали, шаги, которые вы выполняете.   -  person Krutik Jayswal    schedule 07.07.2015


Ответы (2)


Вы можете расширить следующий проект — https://github.com/FlexSolution/SocialLogin. Он использует oauth2 для входа в Alfresco с использованием учетной записи LinkedIn.

Видео, как это работает, доступно на youtube - https://www.youtube.com/watch?v=4dpueBkL-Jo&index=5&list=PLjxSLwMQLhLifbIIC5qkVio8VoakzncXg

person Sergey Palyukh    schedule 22.12.2017

В наши дни вы захотите использовать Google2Api. Также в вашей конфигурации отсутствует параметр подсказка.

        <!-- This is a constant and my be different in future releases -->
        <name>Google2Api</name>
        <!-- Whether to re-prompt the user for consent -->
        <prompt>auto</prompt>
person mlt    schedule 18.08.2015