legacy-knowledge-base
公開されました Jul. 2, 2025

OSGiポートレット内で "check-auth-token "パラメータを設定するには?

written-by

Nathan Roberts

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

現在のLiferay DXPポータル・プロパティ・ファイルには、"check-auth-token "パラメータとして以下が含まれています。

    #
    # Set this to true to enable authentication token security checks. The
    # checks can be disabled for specific actions via the property
    # "auth.token.ignore.actions" or for specific portlets via the init
    # parameter "check-auth-token" in portlet.xml.
    #
    auth.token.check.enabled=true

OSGi ポートレットには portlet.xml ファイルがないので、"check-auth-token" パラメータは使用できません。

環境への配慮

  • ライフレイDXP 7.0
  • Liferay DXP 7.1
  • Liferay DXP 7.2

決議

特定のポートレットのチェックを無効にするには、対応するポートレットクラスの @Component アノテーション内で以下のプロパティを設定します。

@Component(
property = {
javax.portlet.init-param.check-auth-token=false,
// Other properties
},
service = Portlet.class
)
public class MyPortletClass { ... }

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base