1
我試圖OpenID登錄支持使用示例代碼上the documentation page添加到播放框架應用程序:如何在向Play Framework應用程序添加OpenID支持時調用absoluteURL()?
Map<String, String> attributes = new HashMap<String, String>();
attributes.put("email", "http://schema.openid.net/contact/email");
OpenID.redirectURL(
openid,
routes.Application.openIDCallback.absoluteURL(),
attributes
);
的問題是,當我使用此代碼,我得到以下編譯錯誤:
cannot find symbol [symbol: method absoluteURL()] [location: class play.api.mvc.Call]
確實,Call
類沒有無參數absoluteURL()
方法;呼叫#absoluteURL()方法是:
absoluteURL(Http.Request request)
和:
absoluteURL(Http.Request request, boolean secure)
我需要什麼Http.Request
情況下使用? secure
參數的意義是什麼?
這似乎是工作。你知道爲什麼當前的請求必須通過嗎? –
也許會將最初的請求標頭(接受,語言等)傳遞給最終的請求。 –