問題
現在の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 { ... }