2011-11-21 3 views
1

현재 개발중인 포틀릿에 대한 퍼머 링크 시스템을 만들려고합니다 (Spring MVC, Liferay 6.0.6). 내 생각은 특수 URL을 만들고 매핑하는 것이므로 현재 URL에 쿼리 문자열을 추가했습니다. 로그 아웃/로그인 후에 링크를 사용하려고 시도하기 전까지는 문제가 없었습니다.Liferay 포틀릿에서 퍼머 링크 (permalink) 메커니즘 구현

http://localhost:8080/web/guest/home?p_auth=ASDFGH&p_p_id=xviewer_WAR_xviewer_INSTANCE_Yz9i&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=1&_xviewer_WAR_xviewer_INSTANCE_Yz9i_action=permalink&xQuery=asd 

문제는 Liferay가 충분하지 않은 권한에 대해 비명을 지르는 것입니다. 어떻게해야합니까?

+0

에서 "인증 토큰"설정인가? 웹 콘텐츠 또는 다른 항목? – Jonny

+0

검색 결과 테이블 (동적으로 렌더링 됨)에 대한 링크입니다. – Queequeg

답변

1

나는 문제가 당신이 테스트를 위해, 다시 링크를 확인하고 테스트를 다시 시작 서버, portal-ext.properties

auth.token.check.enabled=false 

를 넣을 수 p_auth=ASDFGH 와 것 같다.

특정 포틀릿/작업에 대해 토큰 검사를 사용하지 않도록 설정할 수있는 몇 가지 옵션이 있습니다.

다음과 같은 속성이 가리키는하는이 영구 링크를 원하는 무엇 portal.properties

# 
# 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 

# 
# Set the authentication token class. This class must implement 
# com.liferay.portal.security.auth.AuthToken. This class is used to prevent 
# CSRF attacks. See http://issues.liferay.com/browse/LPS-8399 for more 
# information. 
# 
auth.token.impl=com.liferay.portal.security.auth.SessionAuthToken 

# 
# Input a list of comma delimited struts actions that will not be checked 
# for an authentication token. 
# 
auth.token.ignore.actions=\ 
    /asset/rss,\ 
    \ 
    /blogs/rss,\ 
    \ 
    /document_library/edit_file_entry,\ 
    \ 
    /journal/rss,\ 
    \ 
    /image_gallery/edit_image,\ 
    \ 
    /login/login,\ 
    \ 
    /message_boards/rss,\ 
    \ 
    /wiki/edit_page_attachment,\ 
    /wiki/rss 

# 
# Set the shared secret that is used for requests where it is not possible 
# to generate an authentication token (i.e. WSRP). 
# 
auth.token.shared.secret=BAHyWOT9TbPB 
+0

감사합니다. 토큰을 사용할 수 없게 된 결과는 무엇입니까? BTW, ASDF .. 토큰은 그냥 모의였습니다 ;-) – Queequeg

+0

벼룩은 http://www.liferay.com/community/wiki/-/wiki/Main/Authentication+Token에서보세요. –

+0

대단히 감사합니다.) 이것은 필요한 정보입니다. BTW. RENDER 위상 링크를 퍼머 링크로 공유 할 수 있습니까? – Queequeg

관련 문제