James Moger
2011-09-30 d376abaca317746fed3b557045432302b8f0b82f
commit | author | age
f13c4c 1 /*
JM 2  * Copyright 2011 gitblit.com.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
1f9dae 16 package com.gitblit.wicket.pages;
87cc1e 17
JM 18 import org.apache.wicket.markup.html.WebPage;
85c2e6 19 import org.apache.wicket.protocol.http.WebResponse;
JM 20
21 import com.gitblit.GitBlit;
22 import com.gitblit.wicket.GitBlitWebSession;
87cc1e 23
JM 24 public class LogoutPage extends WebPage {
25
26     public LogoutPage() {
85c2e6 27         GitBlitWebSession.get().invalidate();
88598b 28         GitBlit.self().setCookie((WebResponse) getResponse(), null);
87cc1e 29         setRedirect(true);
JM 30         setResponsePage(getApplication().getHomePage());
31     }
32 }