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

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

投稿者

Nathan Roberts

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

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