Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2b919df9
authored
Dec 28, 2012
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
error login redirect is now configurable
1 parent
35b9f5df
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
code/MoyaWeb/WebContent/WEB-INF/web.xml
code/MoyaWeb/WebContent/admin/adduser/login.xhtml
code/MoyaWeb/WebContent/resources/cditools/login/login.xhtml
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/AuthView.java
code/MoyaWeb/WebContent/WEB-INF/web.xml
View file @
2b919df
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<web-app
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://java.sun.com/xml/ns/javaee"
xmlns:web=
"http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id=
"WebApp_ID"
version=
"3.0"
>
<web-app
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://java.sun.com/xml/ns/javaee"
xmlns:web=
"http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id=
"WebApp_ID"
version=
"3.0"
>
<display-name>
LanBortalWeb
</display-name>
<display-name>
LanBortalWeb
</display-name>
<session-config>
<session-config>
<session-timeout>
3
0
</session-timeout>
<session-timeout>
12
0
</session-timeout>
</session-config>
</session-config>
<context-param>
<context-param>
<param-name>
javax.faces.PROJECT_STAGE
</param-name>
<param-name>
javax.faces.PROJECT_STAGE
</param-name>
...
...
code/MoyaWeb/WebContent/admin/adduser/login.xhtml
View file @
2b919df
...
@@ -13,7 +13,7 @@ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/htm
...
@@ -13,7 +13,7 @@ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/htm
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
<h1>
#{i18n['login.login']}
</h1>
<h1>
#{i18n['login.login']}
</h1>
<login:login
/>
<login:login
onError=
"/admin/adduser/start"
/>
</ui:define>
</ui:define>
</ui:composition>
</ui:composition>
...
...
code/MoyaWeb/WebContent/resources/cditools/login/login.xhtml
View file @
2b919df
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<composite:interface>
<composite:interface>
<composite:attribute
name=
"isOneliner"
required=
"false"
/>
<composite:attribute
name=
"isOneliner"
required=
"false"
/>
<composite:attribute
name=
"onError"
required=
"false"
/>
</composite:interface>
</composite:interface>
<composite:implementation>
<composite:implementation>
...
@@ -30,7 +31,7 @@
...
@@ -30,7 +31,7 @@
<h:inputSecret
id=
"gridPwd"
value=
"#{authView.password}"
/>
<h:inputSecret
id=
"gridPwd"
value=
"#{authView.password}"
/>
</h:panelGrid>
</h:panelGrid>
<h:commandButton
id=
"gridsubmit"
actionListener=
"#{authView.executeLogin()}"
value=
"#{i18n['login.submit']}"
/>
<h:commandButton
id=
"gridsubmit"
actionListener=
"#{authView.executeLogin(
cc.attrs.onError
)}"
value=
"#{i18n['login.submit']}"
/>
</c:otherwise>
</c:otherwise>
</c:choose>
</c:choose>
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/AuthView.java
View file @
2b919df
...
@@ -58,8 +58,15 @@ public class AuthView extends GenericCDIView {
...
@@ -58,8 +58,15 @@ public class AuthView extends GenericCDIView {
}
}
public
void
executeLogin
()
{
public
void
executeLogin
()
{
doLogin
(
"/auth/loginError"
);
executeLogin
(
null
);
}
public
void
executeLogin
(
String
onError
)
{
if
(
onError
==
null
)
onError
=
"/auth/loginError"
;
doLogin
(
onError
);
}
}
private
void
doLogin
(
String
onError
)
{
private
void
doLogin
(
String
onError
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment