0

如何在 gsp 中构建 openID ReturnURL?

Define a ReturnURL

This is the endpoint where your webapp will receive and process the authentication responses from the OpenID Provider.

    String _returnURL = "http://example.com/openid";

参考:http ://code.google.com/p/openid4java/wiki/QuickStart

4

1 回答 1

1

假设您在 config.groovy 文件中正确设置了 grails.serverURL,您可以使用绝对设置为 true 的 createLink 标记:

grails.serverURL = "http://example.com"

String _returnURL = createLink(controller:'openid', action:'handleReturn', absolute:true)

// _returnURL -> http://example.com/appname/openid/handleReturn
于 2009-09-12T11:50:31.550 回答