Upgrade codes
parent
86727a7578
commit
1cfd479ad1
|
@ -7,6 +7,13 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public abstract class GuidGenerator {
|
public abstract class GuidGenerator {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* private constructor
|
||||||
|
*/
|
||||||
|
private GuidGenerator() {
|
||||||
|
}
|
||||||
|
|
||||||
public static String generate() {
|
public static String generate() {
|
||||||
return UUID.randomUUID().toString().replaceAll("-", "");
|
return UUID.randomUUID().toString().replaceAll("-", "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class WdcyUserDetails implements UserDetails {
|
||||||
* @return Collection of GrantedAuthority
|
* @return Collection of GrantedAuthority
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Collection<? extends GrantedAuthority> getAuthorities() {
|
public Collection<GrantedAuthority> getAuthorities() {
|
||||||
return Arrays.asList(DEFAULT_USER_ROLE, new SimpleGrantedAuthority(ROLE_PREFIX + "UNITY"), new SimpleGrantedAuthority(ROLE_PREFIX + "MOBILE"));
|
return Arrays.asList(DEFAULT_USER_ROLE, new SimpleGrantedAuthority(ROLE_PREFIX + "UNITY"), new SimpleGrantedAuthority(ROLE_PREFIX + "MOBILE"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class OauthUserApprovalHandler extends TokenServicesUserApprovalHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
OauthClientDetails clientDetails = oauthService.loadOauthClientDetails(authorizationRequest.getClientId());
|
OauthClientDetails clientDetails = oauthService.loadOauthClientDetails(authorizationRequest.getClientId());
|
||||||
return (clientDetails != null && clientDetails.trusted());
|
return clientDetails != null && clientDetails.trusted();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
<title>Mobile dashboard</title>
|
<title>Mobile dashboard</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h3>Hi Mobile.</h3>
|
<h2>Hi Mobile.</h2>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -10,6 +10,6 @@
|
||||||
<title>Unity dashboard</title>
|
<title>Unity dashboard</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h3>Hi Unity.</h3>
|
<h2>Hi Unity.</h2>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -10,6 +10,6 @@
|
||||||
<title>User Overview</title>
|
<title>User Overview</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h3>User Overview</h3>
|
<h2>User Overview</h2>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -10,7 +10,7 @@
|
||||||
<title>Home</title>
|
<title>Home</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h3>spring-oauth is work!</h3>
|
<h2>spring-oauth is work!</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="${contextPath}/logout.do">Logout</a>
|
<a href="${contextPath}/logout.do">Logout</a>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<title>Oauth login</title>
|
<title>Oauth login</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h3>Oauth login</h3>
|
<h2>Oauth login</h2>
|
||||||
|
|
||||||
<form action="${contextPath}/login.do" method="post">
|
<form action="${contextPath}/login.do" method="post">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue