Skip to content

Commit

Permalink
chore - #13 컨벤션에 맞춰 파일 아래 공백 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
kseysh committed Jan 8, 2024
1 parent 1b0d8f7 commit 0c4327d
Show file tree
Hide file tree
Showing 22 changed files with 58 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/main/java/sopt/org/HMH/HmhApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public class HmhApplication {
public static void main(String[] args) {
SpringApplication.run(HmhApplication.class, args);
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/sopt/org/HMH/domain/user/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ public void updateSocialInfo(String nickname, String profileImageUrl) {
this.name = nickname;
this.profileImageUrl = profileImageUrl;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public class UserException extends ExceptionBase {
public UserException(UserError errorBase) {
super(errorBase);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ public HttpStatus getHttpStatus() {
public String getSuccessMessage() {
return this.successMessage;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package sopt.org.HMH.domain.user.dto.request;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import sopt.org.HMH.global.auth.social.SocialPlatform;

@Getter
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class SocialLoginRequest {

private SocialPlatform socialPlatform;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package sopt.org.HMH.domain.user.dto.response;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import sopt.org.HMH.domain.user.domain.User;
import sopt.org.HMH.global.auth.jwt.TokenDto;


@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class LoginResponse {

private Long userId;

private TokenDto tokenDto;

public static LoginResponse of(User loginUser, TokenDto tokenDto) {

return new LoginResponse(loginUser.getId(), tokenDto);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

public interface UserRepository extends JpaRepository<User, Long> {
Optional<User> findBySocialPlatformAndSocialId(SocialPlatform socialPlatform, Long socialId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ private static String parseTokenString(String tokenString) {
}
return strings[1];
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,4 @@ public static Long getUserFromPrincipal(Principal principal) {
}
return Long.valueOf(principal.getName());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public enum JwtValidationType {
EMPTY_JWT("JWT 토큰이 존재하지 않습니다.");

private final String value;
}
}
2 changes: 1 addition & 1 deletion src/main/java/sopt/org/HMH/global/auth/jwt/TokenDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public class TokenDto {
public static TokenDto of(String accessToken, String refreshToken) {
return new TokenDto(accessToken, refreshToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ public class RefreshToken {

@TimeToLive(unit = TimeUnit.SECONDS)
private Integer expiration;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
import org.springframework.data.repository.CrudRepository;

public interface TokenRepository extends CrudRepository<RefreshToken, Long> {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ private void setResponse(HttpServletResponse response) throws IOException {
// 응답 상태코드 401으로 정의
response.getWriter().println(objectMapper.writeValueAsString(ApiResponse.error(JwtError.INVALID_ACCESS_TOKEN)));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ private String getJwtFromRequest(HttpServletRequest request) {
}
return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public UserAuthentication(Object principal, Object credentials,
Collection<? extends GrantedAuthority> authorities) {
super(principal, credentials, authorities);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public enum SocialPlatform {
;

private final String value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
public class KakaoAccount {

private KakaoUserProfile profile;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public class KakaoUserProfile {

private String nickname;
private String profileImageUrl;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public class KakaoUserResponse {
private Long id;

private KakaoAccount kakaoAccount;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public abstract class BaseTimeEntity {

@LastModifiedDate
private LocalDateTime updatedAt;
}
}
2 changes: 1 addition & 1 deletion src/main/java/sopt/org/HMH/global/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public void addCorsMappings(CorsRegistry registry) {
.allowCredentials(true)
.maxAge(3000);
}
}
}

0 comments on commit 0c4327d

Please sign in to comment.