Changing the Destination of the Logout Link

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

The information in this page relates to customizations in Confluence. Consequently, Atlassian Support cannot guarantee to provide any support for the steps described on this page as customizations are not covered under Atlassian Support Offerings. Please be aware that this material is provided for your information only and that you use it at your own risk.

また、ファイルの直接変更によって行われるカスタマイズは、アップグレード プロセスには含まれない点にご注意ください。このような変更は、アップグレード後のインスタンスで手動で再適用する必要があります。

For more details on editing JAR files, refer to: How to edit files in Confluence JAR files

This page describes how to customise the destination of the logout page, for integration with a Single Sign On framework.

To configure a new logout, redirect by changing the way Confluence handles the logout action:

  1. Confluence をシャットダウンします。
  2. un-jar the confluence-x.y.z.jar (or com.atlassian.confluence_confluence-x.y.z.jar) file in $confluence-install/confluence/WEB-INF/lib, to another location. You can use a standard zip application or the java -jar command 
    Alternative to un-jar-ing, edit the xwork.xml/struts.xml directly in the jar file
  3. Locate xwork.xml
    1. (info) For Confluence 8.0.0+, locate the file struts.xml 
  4. Change the behavior of logout.action by altering these lines:

    <!-- <result name="success" type="velocity">/logout.vm</result> -->
    <!-- CAS:START - CAS Logout Redirect -->
    <result name="success" type="redirect">https://cas.institution.edu/cas/logout</result>
    <!-- CAS:END -->
    

    Newer versions will need to be changed as such:

    From
            <action name="logout" class="com.atlassian.confluence.user.actions.LogoutAction">
                <interceptor-ref name="defaultStack"/>
                <result name="error" type="velocity">/logout.vm</result>
                <result name="success" type="redirect">${logoutUrl}</result>
            </action>
    TO
             <action name="logout" class="com.atlassian.confluence.user.actions.LogoutAction">
                <interceptor-ref name="defaultStack"/>
                <result name="error" type="velocity">/logout.vm</result>
                <result name="success" type="redirect">https://your.new.logout.url</result>
            </action>
  5. Re-jar the files if you extracted them in Step 1
  6. Confluence を起動します。
tip/resting Created with Sketch.

This example is taken from a CAS customization. What was done here was to comment out the regular success action: /logout.vm, and instead replace it with a redirect to the your custom logout page.



























最終更新日: 2023 年 10 月 17 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.