Example usage for com.liferay.portal.kernel.security.auth AuthTokenUtil getToken

List of usage examples for com.liferay.portal.kernel.security.auth AuthTokenUtil getToken

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.security.auth AuthTokenUtil getToken.

Prototype

public static String getToken(HttpServletRequest httpServletRequest) 

Source Link

Usage

From source file:com.liferay.marketplace.store.web.internal.portlet.RemoteMVCPortlet.java

License:Open Source License

protected void setBaseRequestParameters(PortletRequest portletRequest, PortletResponse portletResponse,
        OAuthRequest oAuthRequest) {/*from   w  w  w  . ja  v a 2 s .  c o  m*/

    HttpServletRequest httpServletRequest = PortalUtil.getHttpServletRequest(portletRequest);

    String clientAuthToken = AuthTokenUtil.getToken(httpServletRequest);

    addOAuthParameter(oAuthRequest, "clientAuthToken", clientAuthToken);

    addOAuthParameter(oAuthRequest, "clientPortletId", getClientPortletId());
    addOAuthParameter(oAuthRequest, "clientURL", PortalUtil.getCurrentCompleteURL(httpServletRequest));
    addOAuthParameter(oAuthRequest, "p_p_id", getServerPortletId());
}