mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 06:27:21 +00:00
(improvement)[build] Use Spotless to customize the code formatting (#1750)
This commit is contained in:
@@ -7,4 +7,5 @@ import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface AuthenticationIgnore {}
|
||||
public @interface AuthenticationIgnore {
|
||||
}
|
||||
|
||||
@@ -24,9 +24,8 @@ public class AuthenticationConfig {
|
||||
@Value("${s2.authentication.token.default.appKey:supersonic}")
|
||||
private String tokenDefaultAppKey;
|
||||
|
||||
@Value(
|
||||
"${s2.authentication.token.appSecret:supersonic:WIaO9YRRVt+7QtpPvyWsARFngnEcbaKBk"
|
||||
+ "783uGFwMrbJBaochsqCH62L4Kijcb0sZCYoSsiKGV/zPml5MnZ3uQ==}")
|
||||
@Value("${s2.authentication.token.appSecret:supersonic:WIaO9YRRVt+7QtpPvyWsARFngnEcbaKBk"
|
||||
+ "783uGFwMrbJBaochsqCH62L4Kijcb0sZCYoSsiKGV/zPml5MnZ3uQ==}")
|
||||
private String tokenAppSecret;
|
||||
|
||||
@Value("${s2.authentication.token.http.header.key:Authorization}")
|
||||
@@ -48,8 +47,7 @@ public class AuthenticationConfig {
|
||||
private Long tokenTimeout;
|
||||
|
||||
public Map<String, String> getAppKeyToSecretMap() {
|
||||
return Arrays.stream(this.tokenAppSecret.split(","))
|
||||
.map(s -> s.split(":"))
|
||||
return Arrays.stream(this.tokenAppSecret.split(",")).map(s -> s.split(":"))
|
||||
.collect(Collectors.toMap(e -> e[0].trim(), e -> e[1].trim()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ public class User {
|
||||
|
||||
private Integer isAdmin;
|
||||
|
||||
public static User get(
|
||||
Long id, String name, String displayName, String email, Integer isAdmin) {
|
||||
public static User get(Long id, String name, String displayName, String email,
|
||||
Integer isAdmin) {
|
||||
return new User(id, name, displayName, email, isAdmin);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,24 +9,14 @@ public class UserWithPassword extends User {
|
||||
|
||||
private String password;
|
||||
|
||||
public UserWithPassword(
|
||||
Long id,
|
||||
String name,
|
||||
String displayName,
|
||||
String email,
|
||||
String password,
|
||||
public UserWithPassword(Long id, String name, String displayName, String email, String password,
|
||||
Integer isAdmin) {
|
||||
super(id, name, displayName, email, isAdmin);
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public static UserWithPassword get(
|
||||
Long id,
|
||||
String name,
|
||||
String displayName,
|
||||
String email,
|
||||
String password,
|
||||
Integer isAdmin) {
|
||||
public static UserWithPassword get(Long id, String name, String displayName, String email,
|
||||
String password, Integer isAdmin) {
|
||||
return new UserWithPassword(id, name, displayName, email, password, isAdmin);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ import java.util.Set;
|
||||
|
||||
public interface UserService {
|
||||
|
||||
User getCurrentUser(
|
||||
HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse);
|
||||
User getCurrentUser(HttpServletRequest httpServletRequest,
|
||||
HttpServletResponse httpServletResponse);
|
||||
|
||||
List<String> getUserNames();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user