Upgrade codes

0.2
lishengzhao 2014-07-30 14:44:11 +08:00
parent 86727a7578
commit 1cfd479ad1
8 changed files with 14 additions and 7 deletions

View File

@ -7,6 +7,13 @@ import java.util.UUID;
*/
public abstract class GuidGenerator {
/**
* private constructor
*/
private GuidGenerator() {
}
public static String generate() {
return UUID.randomUUID().toString().replaceAll("-", "");
}

View File

@ -33,7 +33,7 @@ public class WdcyUserDetails implements UserDetails {
* @return Collection of GrantedAuthority
*/
@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"));
}

View File

@ -26,7 +26,7 @@ public class OauthUserApprovalHandler extends TokenServicesUserApprovalHandler {
}
OauthClientDetails clientDetails = oauthService.loadOauthClientDetails(authorizationRequest.getClientId());
return (clientDetails != null && clientDetails.trusted());
return clientDetails != null && clientDetails.trusted();
}

View File

@ -10,6 +10,6 @@
<title>Mobile dashboard</title>
</head>
<body>
<h3>Hi Mobile.</h3>
<h2>Hi Mobile.</h2>
</body>
</html>

View File

@ -10,6 +10,6 @@
<title>Unity dashboard</title>
</head>
<body>
<h3>Hi Unity.</h3>
<h2>Hi Unity.</h2>
</body>
</html>

View File

@ -10,6 +10,6 @@
<title>User Overview</title>
</head>
<body>
<h3>User Overview</h3>
<h2>User Overview</h2>
</body>
</html>

View File

@ -10,7 +10,7 @@
<title>Home</title>
</head>
<body>
<h3>spring-oauth is work!</h3>
<h2>spring-oauth is work!</h2>
<p>
<a href="${contextPath}/logout.do">Logout</a>

View File

@ -10,7 +10,7 @@
<title>Oauth login</title>
</head>
<body>
<h3>Oauth login</h3>
<h2>Oauth login</h2>
<form action="${contextPath}/login.do" method="post">