00007 Security implement different privilege

0.3
lishengzhao 10 years ago
parent 9ca95af309
commit 4700da0be3

@ -1,7 +1,14 @@
方式1:基于浏览器 (访问时后跳到登录页面,登录成功后跳转到redirect_uri指定的地址) [GET] 方式1:基于浏览器 (访问时后跳到登录页面,登录成功后跳转到redirect_uri指定的地址) [GET]
说明:只能使用admin或unity 账号登录才能有权限访问,若使用mobile账号登录将返回Access is denied
http://localhost:8080/oauth/authorize?client_id=unity-client&redirect_uri=http%3a%2f%2flocalhost%3a8080%2funity%2fdashboard.htm&response_type=code&scope=read http://localhost:8080/oauth/authorize?client_id=unity-client&redirect_uri=http%3a%2f%2flocalhost%3a8080%2funity%2fdashboard.htm&response_type=code&scope=read
说明: 由于mobile-client只支持password,refresh_token, 所以不管用哪个账号登录后都将返回Illegal action
http://localhost:8080/oauth/authorize?client_id=mobile-client&redirect_uri=http%3a%2f%2flocalhost%3a8080%2fmobile%2fdashboard.htm&response_type=code&scope=read
响应的URL如: 响应的URL如:
http://localhost:8080/unity/dashboard.htm?code=zLl170 http://localhost:8080/unity/dashboard.htm?code=zLl170

@ -10,6 +10,8 @@
<title>Mobile dashboard</title> <title>Mobile dashboard</title>
</head> </head>
<body> <body>
<a href="../">Home</a>
<h2>Hi Mobile.</h2> <h2>Hi Mobile.</h2>
</body> </body>
</html> </html>

@ -10,6 +10,8 @@
<title>Oauth Error</title> <title>Oauth Error</title>
</head> </head>
<body> <body>
<a href="${contextPath}/">Home</a>
<p> <p>
Illegal action. Illegal action.
</p> </p>

@ -10,6 +10,8 @@
<title>Unity dashboard</title> <title>Unity dashboard</title>
</head> </head>
<body> <body>
<a href="../">Home</a>
<h2>Hi Unity.</h2> <h2>Hi Unity.</h2>
</body> </body>
</html> </html>
Loading…
Cancel
Save