Upgrade codes
parent
86727a7578
commit
1cfd479ad1
|
@ -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("-", "");
|
||||
}
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
<title>Mobile dashboard</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Hi Mobile.</h3>
|
||||
<h2>Hi Mobile.</h2>
|
||||
</body>
|
||||
</html>
|
|
@ -10,6 +10,6 @@
|
|||
<title>Unity dashboard</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Hi Unity.</h3>
|
||||
<h2>Hi Unity.</h2>
|
||||
</body>
|
||||
</html>
|
|
@ -10,6 +10,6 @@
|
|||
<title>User Overview</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3>User Overview</h3>
|
||||
<h2>User Overview</h2>
|
||||
</body>
|
||||
</html>
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
||||
|
|
Loading…
Reference in New Issue