Committed by
Gerrit Code Review
Adding GUI login/logout capability using form-based login.
Adding REST API login capability using basic authentication. HTTP to HTTPS redirect is suppressed for now. Change-Id: I1a98bdc5576c515e1aa5a1b8d66402af0c0bf8c8
Showing
14 changed files
with
306 additions
and
47 deletions
... | @@ -7,6 +7,17 @@ rm -f $(dirname $0)/onos | ... | @@ -7,6 +7,17 @@ rm -f $(dirname $0)/onos |
7 | 7 | ||
8 | set -e | 8 | set -e |
9 | 9 | ||
10 | +# Scan argument for user/password or other options... | ||
11 | +while getopts u:p: o; do | ||
12 | + case "$o" in | ||
13 | + u) user=$OPTARG;; | ||
14 | + p) password=$OPTARG;; | ||
15 | + esac | ||
16 | +done | ||
17 | +password=${password:-user} # password defaults to the user name if not specified | ||
18 | +let OPC=$OPTIND-1 | ||
19 | +shift $OPC | ||
20 | + | ||
10 | cd $(dirname $0)/../apache-karaf-*/etc | 21 | cd $(dirname $0)/../apache-karaf-*/etc |
11 | USERS=users.properties | 22 | USERS=users.properties |
12 | KEYS=keys.properties | 23 | KEYS=keys.properties |
... | @@ -18,5 +29,10 @@ egrep -v "^(#karaf|onos)[ ]*=" $KEYS > $KEYS.new && mv $KEYS.new $KEYS | ... | @@ -18,5 +29,10 @@ egrep -v "^(#karaf|onos)[ ]*=" $KEYS > $KEYS.new && mv $KEYS.new $KEYS |
18 | # Remove any previous known keys for the local host. | 29 | # Remove any previous known keys for the local host. |
19 | ssh-keygen -f "$HOME/.ssh/known_hosts" -R [localhost]:8101 | 30 | ssh-keygen -f "$HOME/.ssh/known_hosts" -R [localhost]:8101 |
20 | 31 | ||
21 | -# Swap the onos client to use the SSH variant | 32 | +# Swap the onos client to use the SSH variant. |
22 | ln -s $(dirname $0)/onos-ssh $(dirname $0)/onos | 33 | ln -s $(dirname $0)/onos-ssh $(dirname $0)/onos |
34 | + | ||
35 | +# If user and password options were given, setup the user/password. | ||
36 | +if [ -n "$user" -a -n "$password" ]; then | ||
37 | + echo "$user = $password,_g_:admingroup" >> $USERS | ||
38 | +fi | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
tools/package/etc/org.ops4j.pax.web.cfg
0 → 100644
1 | +org.osgi.service.http.port=8181 | ||
2 | +org.osgi.service.http.port.secure=8443 | ||
3 | + | ||
4 | +org.osgi.service.http.enabled=true | ||
5 | +org.osgi.service.http.secure.enabled=false | ||
6 | + | ||
7 | +org.ops4j.pax.web.ssl.keystore=etc/keystore | ||
8 | +org.ops4j.pax.web.ssl.password=OBF:1xtn1w1u1uob1xtv1y7z1xtn1unn1w1o1xtv | ||
9 | +org.ops4j.pax.web.ssl.keypassword=OBF:1xtn1w1u1uob1xtv1y7z1xtn1unn1w1o1xtv | ||
10 | + | ||
11 | +org.ops4j.pax.web.session.url=none | ||
12 | +org.ops4j.pax.web.config.file=./etc/jetty.xml |
... | @@ -19,7 +19,7 @@ for node in $nodes; do | ... | @@ -19,7 +19,7 @@ for node in $nodes; do |
19 | ssh $ONOS_USER@$node " | 19 | ssh $ONOS_USER@$node " |
20 | [ ! -f ~/.ssh/id_rsa.pub ] && ssh-keygen -t rsa -f ~/.ssh/id_rsa -P '' -q | 20 | [ ! -f ~/.ssh/id_rsa.pub ] && ssh-keygen -t rsa -f ~/.ssh/id_rsa -P '' -q |
21 | $ONOS_INSTALL_DIR/bin/onos-user-key \$(id -un) \$(cut -d\\ -f2 ~/.ssh/id_rsa.pub) | 21 | $ONOS_INSTALL_DIR/bin/onos-user-key \$(id -un) \$(cut -d\\ -f2 ~/.ssh/id_rsa.pub) |
22 | - $ONOS_INSTALL_DIR/bin/onos-secure-ssh | 22 | + $ONOS_INSTALL_DIR/bin/onos-secure-ssh "$@" |
23 | 23 | ||
24 | # Implicitly accept the new server key in dev/test environments | 24 | # Implicitly accept the new server key in dev/test environments |
25 | while ! ssh -p 8101 -o StrictHostKeyChecking=no localhost list 2>/dev/null; do | 25 | while ! ssh -p 8101 -o StrictHostKeyChecking=no localhost list 2>/dev/null; do | ... | ... |
... | @@ -16,7 +16,7 @@ | ... | @@ -16,7 +16,7 @@ |
16 | <scenario name="setup" description="ONOS cluster setup"> | 16 | <scenario name="setup" description="ONOS cluster setup"> |
17 | <group name="Setup"> | 17 | <group name="Setup"> |
18 | <step name="Push-Bits" exec="onos-push-bits-through-proxy" if="${OCT}"/> | 18 | <step name="Push-Bits" exec="onos-push-bits-through-proxy" if="${OCT}"/> |
19 | - <step name="Secure-SSH" exec="onos-secure-ssh" if="${ONOS_USE_SSH}"/> | 19 | + <step name="Secure-SSH" exec="onos-secure-ssh -u onos -p rocks" if="${ONOS_USE_SSH}"/> |
20 | 20 | ||
21 | <parallel var="${OC#}"> | 21 | <parallel var="${OC#}"> |
22 | <step name="Push-Bits-${#}" exec="onos-push-bits ${OC#}" | 22 | <step name="Push-Bits-${#}" exec="onos-push-bits ${OC#}" | ... | ... |
... | @@ -21,30 +21,26 @@ | ... | @@ -21,30 +21,26 @@ |
21 | <display-name>ONOS REST API v1.0</display-name> | 21 | <display-name>ONOS REST API v1.0</display-name> |
22 | 22 | ||
23 | <!-- | 23 | <!-- |
24 | + --> | ||
24 | <security-constraint> | 25 | <security-constraint> |
25 | - <display-name>authenticated</display-name> | ||
26 | <web-resource-collection> | 26 | <web-resource-collection> |
27 | - <web-resource-name>All files</web-resource-name> | 27 | + <web-resource-name>Secured</web-resource-name> |
28 | - <description/> | ||
29 | <url-pattern>/*</url-pattern> | 28 | <url-pattern>/*</url-pattern> |
30 | </web-resource-collection> | 29 | </web-resource-collection> |
31 | <auth-constraint> | 30 | <auth-constraint> |
32 | - <description/> | ||
33 | <role-name>admin</role-name> | 31 | <role-name>admin</role-name> |
34 | </auth-constraint> | 32 | </auth-constraint> |
35 | </security-constraint> | 33 | </security-constraint> |
36 | 34 | ||
35 | + <security-role> | ||
36 | + <role-name>admin</role-name> | ||
37 | + </security-role> | ||
38 | + | ||
37 | <login-config> | 39 | <login-config> |
38 | <auth-method>BASIC</auth-method> | 40 | <auth-method>BASIC</auth-method> |
39 | <realm-name>karaf</realm-name> | 41 | <realm-name>karaf</realm-name> |
40 | </login-config> | 42 | </login-config> |
41 | 43 | ||
42 | - <security-role> | ||
43 | - <description/> | ||
44 | - <role-name>admin</role-name> | ||
45 | - </security-role> | ||
46 | - --> | ||
47 | - | ||
48 | <servlet> | 44 | <servlet> |
49 | <servlet-name>JAX-RS Service</servlet-name> | 45 | <servlet-name>JAX-RS Service</servlet-name> |
50 | <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> | 46 | <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> | ... | ... |
... | @@ -73,6 +73,8 @@ | ... | @@ -73,6 +73,8 @@ |
73 | <_wab>src/main/webapp/</_wab> | 73 | <_wab>src/main/webapp/</_wab> |
74 | <Include-Resource> | 74 | <Include-Resource> |
75 | WEB-INF/classes/index.html=src/main/webapp/index.html, | 75 | WEB-INF/classes/index.html=src/main/webapp/index.html, |
76 | + WEB-INF/classes/login.html=src/main/webapp/login.html, | ||
77 | + WEB-INF/classes/error.html=src/main/webapp/error.html, | ||
76 | WEB-INF/classes/not-ready.html=src/main/webapp/not-ready.html, | 78 | WEB-INF/classes/not-ready.html=src/main/webapp/not-ready.html, |
77 | WEB-INF/classes/onos.js=src/main/webapp/onos.js, | 79 | WEB-INF/classes/onos.js=src/main/webapp/onos.js, |
78 | WEB-INF/classes/nav.html=src/main/webapp/nav.html, | 80 | WEB-INF/classes/nav.html=src/main/webapp/nav.html, | ... | ... |
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
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 | + */ | ||
16 | +package org.onosproject.ui.impl; | ||
17 | + | ||
18 | +import org.onlab.rest.BaseResource; | ||
19 | + | ||
20 | +import javax.servlet.http.HttpServletRequest; | ||
21 | +import javax.ws.rs.GET; | ||
22 | +import javax.ws.rs.Path; | ||
23 | +import javax.ws.rs.core.Context; | ||
24 | +import javax.ws.rs.core.Response; | ||
25 | +import java.io.IOException; | ||
26 | +import java.net.URI; | ||
27 | +import java.net.URISyntaxException; | ||
28 | + | ||
29 | +/** | ||
30 | + * Application upload resource. | ||
31 | + */ | ||
32 | +@Path("logout") | ||
33 | +public class LogoutResource extends BaseResource { | ||
34 | + | ||
35 | + @Context | ||
36 | + private HttpServletRequest servletRequest; | ||
37 | + | ||
38 | + @GET | ||
39 | + public Response logout() throws IOException, URISyntaxException { | ||
40 | + servletRequest.getSession().invalidate(); | ||
41 | + String url = servletRequest.getRequestURL().toString(); | ||
42 | + url = url.replaceFirst("/onos/ui/.*", "/onos/ui/login.html"); | ||
43 | + return Response.temporaryRedirect(new URI(url)).build(); | ||
44 | + } | ||
45 | + | ||
46 | +} |
... | @@ -14,7 +14,8 @@ | ... | @@ -14,7 +14,8 @@ |
14 | ~ See the License for the specific language governing permissions and | 14 | ~ See the License for the specific language governing permissions and |
15 | ~ limitations under the License. | 15 | ~ limitations under the License. |
16 | --> | 16 | --> |
17 | -<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" | 17 | +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
18 | + xmlns="http://java.sun.com/xml/ns/javaee" | ||
18 | xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | 19 | xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" |
19 | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | 20 | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" |
20 | id="ONOS" version="2.5"> | 21 | id="ONOS" version="2.5"> |
... | @@ -25,38 +26,44 @@ | ... | @@ -25,38 +26,44 @@ |
25 | </welcome-file-list> | 26 | </welcome-file-list> |
26 | 27 | ||
27 | <!-- | 28 | <!-- |
29 | + --> | ||
28 | <security-constraint> | 30 | <security-constraint> |
29 | - <display-name>authenticated</display-name> | ||
30 | <web-resource-collection> | 31 | <web-resource-collection> |
31 | - <web-resource-name>All files</web-resource-name> | 32 | + <web-resource-name>Secured</web-resource-name> |
32 | - <description/> | 33 | + <url-pattern>/index.html</url-pattern> |
33 | - <url-pattern>/*</url-pattern> | ||
34 | </web-resource-collection> | 34 | </web-resource-collection> |
35 | <auth-constraint> | 35 | <auth-constraint> |
36 | - <description/> | ||
37 | <role-name>admin</role-name> | 36 | <role-name>admin</role-name> |
38 | </auth-constraint> | 37 | </auth-constraint> |
38 | + <!-- | ||
39 | + <user-data-constraint> | ||
40 | + <transport-guarantee>CONFIDENTIAL</transport-guarantee> | ||
41 | + </user-data-constraint> | ||
42 | + --> | ||
39 | </security-constraint> | 43 | </security-constraint> |
40 | 44 | ||
41 | - <login-config> | ||
42 | - <auth-method>BASIC</auth-method> | ||
43 | - <realm-name>karaf</realm-name> | ||
44 | - </login-config> | ||
45 | - | ||
46 | <security-role> | 45 | <security-role> |
47 | - <description/> | ||
48 | <role-name>admin</role-name> | 46 | <role-name>admin</role-name> |
49 | </security-role> | 47 | </security-role> |
50 | - --> | ||
51 | 48 | ||
52 | - <!-- | 49 | + <login-config> |
53 | - --> | 50 | + <auth-method>FORM</auth-method> |
51 | + <realm-name>karaf</realm-name> | ||
52 | + <form-login-config> | ||
53 | + <form-login-page>/login.html</form-login-page> | ||
54 | + <form-error-page>/error.html</form-error-page> | ||
55 | + </form-login-config> | ||
56 | + </login-config> | ||
57 | + | ||
54 | <servlet> | 58 | <servlet> |
55 | <servlet-name>Index Page</servlet-name> | 59 | <servlet-name>Index Page</servlet-name> |
56 | - <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> | 60 | + <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer |
61 | + </servlet-class> | ||
57 | <init-param> | 62 | <init-param> |
58 | - <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name> | 63 | + <param-name>com.sun.jersey.config.property.resourceConfigClass |
59 | - <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig</param-value> | 64 | + </param-name> |
65 | + <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig | ||
66 | + </param-value> | ||
60 | </init-param> | 67 | </init-param> |
61 | <init-param> | 68 | <init-param> |
62 | <param-name>com.sun.jersey.config.property.classnames</param-name> | 69 | <param-name>com.sun.jersey.config.property.classnames</param-name> |
... | @@ -68,19 +75,22 @@ | ... | @@ -68,19 +75,22 @@ |
68 | <servlet-mapping> | 75 | <servlet-mapping> |
69 | <servlet-name>Index Page</servlet-name> | 76 | <servlet-name>Index Page</servlet-name> |
70 | <url-pattern>/index.html</url-pattern> | 77 | <url-pattern>/index.html</url-pattern> |
71 | - <url-pattern>/main.html</url-pattern> | ||
72 | </servlet-mapping> | 78 | </servlet-mapping> |
73 | 79 | ||
74 | <servlet> | 80 | <servlet> |
75 | <servlet-name>Main Module</servlet-name> | 81 | <servlet-name>Main Module</servlet-name> |
76 | - <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> | 82 | + <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer |
83 | + </servlet-class> | ||
77 | <init-param> | 84 | <init-param> |
78 | - <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name> | 85 | + <param-name>com.sun.jersey.config.property.resourceConfigClass |
79 | - <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig</param-value> | 86 | + </param-name> |
87 | + <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig | ||
88 | + </param-value> | ||
80 | </init-param> | 89 | </init-param> |
81 | <init-param> | 90 | <init-param> |
82 | <param-name>com.sun.jersey.config.property.classnames</param-name> | 91 | <param-name>com.sun.jersey.config.property.classnames</param-name> |
83 | - <param-value>org.onosproject.ui.impl.MainModuleResource</param-value> | 92 | + <param-value>org.onosproject.ui.impl.MainModuleResource |
93 | + </param-value> | ||
84 | </init-param> | 94 | </init-param> |
85 | <load-on-startup>1</load-on-startup> | 95 | <load-on-startup>1</load-on-startup> |
86 | </servlet> | 96 | </servlet> |
... | @@ -92,10 +102,13 @@ | ... | @@ -92,10 +102,13 @@ |
92 | 102 | ||
93 | <servlet> | 103 | <servlet> |
94 | <servlet-name>Nav Module</servlet-name> | 104 | <servlet-name>Nav Module</servlet-name> |
95 | - <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> | 105 | + <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer |
106 | + </servlet-class> | ||
96 | <init-param> | 107 | <init-param> |
97 | - <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name> | 108 | + <param-name>com.sun.jersey.config.property.resourceConfigClass |
98 | - <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig</param-value> | 109 | + </param-name> |
110 | + <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig | ||
111 | + </param-value> | ||
99 | </init-param> | 112 | </init-param> |
100 | <init-param> | 113 | <init-param> |
101 | <param-name>com.sun.jersey.config.property.classnames</param-name> | 114 | <param-name>com.sun.jersey.config.property.classnames</param-name> |
... | @@ -111,10 +124,13 @@ | ... | @@ -111,10 +124,13 @@ |
111 | 124 | ||
112 | <servlet> | 125 | <servlet> |
113 | <servlet-name>View Module</servlet-name> | 126 | <servlet-name>View Module</servlet-name> |
114 | - <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> | 127 | + <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer |
128 | + </servlet-class> | ||
115 | <init-param> | 129 | <init-param> |
116 | - <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name> | 130 | + <param-name>com.sun.jersey.config.property.resourceConfigClass |
117 | - <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig</param-value> | 131 | + </param-name> |
132 | + <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig | ||
133 | + </param-value> | ||
118 | </init-param> | 134 | </init-param> |
119 | <init-param> | 135 | <init-param> |
120 | <param-name>com.sun.jersey.config.property.classnames</param-name> | 136 | <param-name>com.sun.jersey.config.property.classnames</param-name> |
... | @@ -130,14 +146,18 @@ | ... | @@ -130,14 +146,18 @@ |
130 | 146 | ||
131 | <servlet> | 147 | <servlet> |
132 | <servlet-name>JAX-RS Service</servlet-name> | 148 | <servlet-name>JAX-RS Service</servlet-name> |
133 | - <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> | 149 | + <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer |
150 | + </servlet-class> | ||
134 | <init-param> | 151 | <init-param> |
135 | - <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name> | 152 | + <param-name>com.sun.jersey.config.property.resourceConfigClass |
136 | - <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig</param-value> | 153 | + </param-name> |
154 | + <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig | ||
155 | + </param-value> | ||
137 | </init-param> | 156 | </init-param> |
138 | <init-param> | 157 | <init-param> |
139 | <param-name>com.sun.jersey.config.property.classnames</param-name> | 158 | <param-name>com.sun.jersey.config.property.classnames</param-name> |
140 | <param-value> | 159 | <param-value> |
160 | + org.onosproject.ui.impl.LogoutResource, | ||
141 | org.onosproject.ui.impl.TopologyResource, | 161 | org.onosproject.ui.impl.TopologyResource, |
142 | org.onosproject.ui.impl.ApplicationResource | 162 | org.onosproject.ui.impl.ApplicationResource |
143 | </param-value> | 163 | </param-value> |
... | @@ -152,7 +172,8 @@ | ... | @@ -152,7 +172,8 @@ |
152 | 172 | ||
153 | <servlet> | 173 | <servlet> |
154 | <servlet-name>Web Socket Service</servlet-name> | 174 | <servlet-name>Web Socket Service</servlet-name> |
155 | - <servlet-class>org.onosproject.ui.impl.UiWebSocketServlet</servlet-class> | 175 | + <servlet-class>org.onosproject.ui.impl.UiWebSocketServlet |
176 | + </servlet-class> | ||
156 | <load-on-startup>2</load-on-startup> | 177 | <load-on-startup>2</load-on-startup> |
157 | </servlet> | 178 | </servlet> |
158 | 179 | ... | ... |
... | @@ -82,3 +82,21 @@ html[data-platform='iPad'] #mast { | ... | @@ -82,3 +82,21 @@ html[data-platform='iPad'] #mast { |
82 | float: right; | 82 | float: right; |
83 | /*border: 1px solid red;*/ | 83 | /*border: 1px solid red;*/ |
84 | } | 84 | } |
85 | + | ||
86 | +#mast-right a { | ||
87 | + font-size: 12pt; | ||
88 | + font-style: normal; | ||
89 | + font-weight: bold; | ||
90 | + text-decoration: none; | ||
91 | +} | ||
92 | + | ||
93 | +.light #mast-right a { | ||
94 | + color: #369; | ||
95 | +} | ||
96 | +.dark #mast-right a { | ||
97 | + color: #eee; | ||
98 | +} | ||
99 | + | ||
100 | +#mast-right a:hover { | ||
101 | + color: #CE5650; | ||
102 | +} | ... | ... |
... | @@ -3,4 +3,4 @@ | ... | @@ -3,4 +3,4 @@ |
3 | ng-click="mastCtrl.toggleNav()"></div> | 3 | ng-click="mastCtrl.toggleNav()"></div> |
4 | <img class="logo" src="data/img/onos-logo.png"> | 4 | <img class="logo" src="data/img/onos-logo.png"> |
5 | <span class="title">Open Network Operating System</span> | 5 | <span class="title">Open Network Operating System</span> |
6 | -<div id="mast-right"></div> | 6 | +<div id="mast-right"><a href="rs/logout">logout</a></div> | ... | ... |
58.3 KB
40.1 KB
web/gui/src/main/webapp/error.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | + <meta charset="UTF-8"> | ||
5 | + <title>ONOS Login</title> | ||
6 | + | ||
7 | + <style type="text/css"> | ||
8 | + img { | ||
9 | + margin: 24px; | ||
10 | + } | ||
11 | + td { | ||
12 | + font: normal 16px Helvetica, Arial, sans-serif !important; | ||
13 | + text-align: left; | ||
14 | + padding: 4px; | ||
15 | + } | ||
16 | + input { | ||
17 | + font: normal 16px Helvetica, Arial, sans-serif !important; | ||
18 | + padding: 3px; | ||
19 | + } | ||
20 | + | ||
21 | + input[type="submit"] { | ||
22 | + margin-top: 20px; | ||
23 | + margin-left: auto; | ||
24 | + margin-right: auto; | ||
25 | + display: block; | ||
26 | + padding: 4px 16px; | ||
27 | + background-color: #CE5650; | ||
28 | + color: #fff; | ||
29 | + /*width: 100%; /!* width of image *!/*/ | ||
30 | + height: 32px; | ||
31 | + border-radius: 3px; | ||
32 | + border: 0; | ||
33 | + -moz-outline-radius: 6px; | ||
34 | + } | ||
35 | + | ||
36 | + input[type="submit"]:hover { | ||
37 | + border-radius: 3px; | ||
38 | + border: 1px; | ||
39 | + border-color: #fff; | ||
40 | + border-style: solid; | ||
41 | + box-shadow: 0px 0px 10px #3399ff; | ||
42 | + outline-style: solid; | ||
43 | + outline-width: 3px; | ||
44 | + outline-color: #3399ff; | ||
45 | + } | ||
46 | + | ||
47 | + #error { | ||
48 | + margin: 16px auto; | ||
49 | + color: #CE5650; | ||
50 | + text-align: center; | ||
51 | + | ||
52 | + } | ||
53 | + </style> | ||
54 | +</head> | ||
55 | +<body> | ||
56 | +<div align="center"> | ||
57 | + <img src="data/img/onos-logo.lg.png"/> | ||
58 | + | ||
59 | + <form method="post" action="j_security_check"> | ||
60 | + <table> | ||
61 | + <tr> | ||
62 | + <td>User:</td> | ||
63 | + <td><input id="username" name="j_username" type="text" autofocus/></td> | ||
64 | + </tr> | ||
65 | + <tr> | ||
66 | + <td>Password:</td> | ||
67 | + <td><input id="password" name="j_password" type="password"/></td> | ||
68 | + </tr> | ||
69 | + <tr> | ||
70 | + <td colspan="2"><input id="submit" type="submit" value="Login"/></td> | ||
71 | + </tr> | ||
72 | + <tr> | ||
73 | + <td colspan="2"><div id="error">Incorrect login credentials!</div></td> | ||
74 | + </tr> | ||
75 | + </table> | ||
76 | + </form> | ||
77 | +</div> | ||
78 | +</body> | ||
79 | +</html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
web/gui/src/main/webapp/login.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | + <meta charset="UTF-8"> | ||
5 | + <title>ONOS Login</title> | ||
6 | + | ||
7 | + <style type="text/css"> | ||
8 | + img { | ||
9 | + margin: 24px; | ||
10 | + } | ||
11 | + td { | ||
12 | + font: normal 16px Helvetica, Arial, sans-serif !important; | ||
13 | + text-align: left; | ||
14 | + padding: 4px; | ||
15 | + } | ||
16 | + input { | ||
17 | + font: normal 16px Helvetica, Arial, sans-serif !important; | ||
18 | + padding: 3px; | ||
19 | + } | ||
20 | + | ||
21 | + input[type="submit"] { | ||
22 | + margin-top: 20px; | ||
23 | + margin-left: auto; | ||
24 | + margin-right: auto; | ||
25 | + display: block; | ||
26 | + padding: 4px 16px; | ||
27 | + background-color: #CE5650; | ||
28 | + color: #fff; | ||
29 | + /*width: 100%; /!* width of image *!/*/ | ||
30 | + height: 32px; | ||
31 | + border-radius: 3px; | ||
32 | + border: 0; | ||
33 | + -moz-outline-radius: 6px; | ||
34 | + } | ||
35 | + | ||
36 | + input[type="submit"]:hover { | ||
37 | + border-radius: 3px; | ||
38 | + border: 1px; | ||
39 | + border-color: #fff; | ||
40 | + border-style: solid; | ||
41 | + box-shadow: 0px 0px 10px #3399ff; | ||
42 | + outline-style: solid; | ||
43 | + outline-width: 3px; | ||
44 | + outline-color: #3399ff; | ||
45 | + } | ||
46 | + </style> | ||
47 | +</head> | ||
48 | +<body> | ||
49 | +<div align="center"> | ||
50 | + <img src="data/img/onos-logo.lg.png"/> | ||
51 | + | ||
52 | + <form method="post" action="j_security_check"> | ||
53 | + <table> | ||
54 | + <tr> | ||
55 | + <td>User:</td> | ||
56 | + <td><input id="username" name="j_username" type="text" autofocus/></td> | ||
57 | + </tr> | ||
58 | + <tr> | ||
59 | + <td>Password:</td> | ||
60 | + <td><input id="password" name="j_password" type="password"/></td> | ||
61 | + </tr> | ||
62 | + <tr> | ||
63 | + <td colspan="2"><input id="submit" type="submit" value="Login"/></td> | ||
64 | + </tr> | ||
65 | + </table> | ||
66 | + </form> | ||
67 | +</div> | ||
68 | +</body> | ||
69 | +</html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment