本文整理汇总了Java中com.mendix.m2ee.api.IMxRuntimeResponse.addCookie方法的典型用法代码示例。如果您正苦于以下问题:Java IMxRuntimeResponse.addCookie方法的具体用法?Java IMxRuntimeResponse.addCookie怎么用?Java IMxRuntimeResponse.addCookie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.mendix.m2ee.api.IMxRuntimeResponse
的用法示例。
在下文中一共展示了IMxRuntimeResponse.addCookie方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: logoff
import com.mendix.m2ee.api.IMxRuntimeResponse; //导入方法依赖的package包/类
private void logoff(IMxRuntimeRequest req, IMxRuntimeResponse resp) throws CoreException {
if (SINGLESIGNOFF_ENABLED) {
resp.addCookie(getSessionCookieName(), "", "/", "", 0, true);
resp.addCookie(SessionInitializer.XASID_COOKIE, "", "/", "", 0, true);
resp.setStatus(IMxRuntimeResponse.SEE_OTHER);
resp.addHeader("location", OPENID_PROVIDER + "/../" + LOGOFF);
} else {
ISession ses = this.getSessionFromRequest(req);
if (ses != null) {
Core.logout(ses);
}
redirect(resp, INDEX_PAGE);
}
}
示例2: logoff
import com.mendix.m2ee.api.IMxRuntimeResponse; //导入方法依赖的package包/类
private void logoff(IMxRuntimeRequest req, IMxRuntimeResponse resp) throws CoreException {
if (SINGLESIGNOFF_ENABLED) {
resp.addCookie(Core.getConfiguration().getSessionIdCookieName(), "", "/", "", 0, true);
resp.addCookie(SessionInitializer.XASID_COOKIE, "", "/", "", 0, true);
resp.setStatus(IMxRuntimeResponse.SEE_OTHER);
resp.addHeader("location", OPENID_PROVIDER + "/../" + LOGOFF);
} else {
ISession ses = this.getSessionFromRequest(req);
if (ses != null) {
Core.logout(ses);
}
redirect(resp, INDEX_PAGE);
}
}
示例3: writeSessionCookies
import com.mendix.m2ee.api.IMxRuntimeResponse; //导入方法依赖的package包/类
public static void writeSessionCookies(IMxRuntimeResponse resp,
ISession session) {
resp.addCookie(XAS_SESSION_ID, session.getId().toString(),"/" ,"" ,-1, true );
resp.addCookie(XASID_COOKIE, "0." + Core.getXASId(),"/" ,"" ,-1, true);
resp.addCookie(ORIGIN_COOKIE, "/" + OpenIDHandler.OPENID_CLIENTSERVLET_LOCATION + OpenIDHandler.LOGIN, "/", "", -1, false);
}
示例4: writeSessionCookies
import com.mendix.m2ee.api.IMxRuntimeResponse; //导入方法依赖的package包/类
public static void writeSessionCookies(IMxRuntimeResponse resp,
ISession session) {
resp.addCookie(Core.getConfiguration().getSessionIdCookieName(), session.getId().toString(),"/" ,"" ,-1, true );
resp.addCookie(XASID_COOKIE, "0." + Core.getXASId(),"/" ,"" ,-1, true);
resp.addCookie(ORIGIN_COOKIE, "/" + OpenIDHandler.OPENID_CLIENTSERVLET_LOCATION + OpenIDHandler.LOGIN, "/", "", -1, false);
}