Skip to content

Commit

Permalink
Merge pull request #91 from JNU-econovation/fix/directory
Browse files Browse the repository at this point in the history
[Fix] security 의존성 제거로 인한 directory 위치 변경
  • Loading branch information
kssumin authored Oct 10, 2023
2 parents f6f4842 + 716544b commit 8dbec57
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import com.econovation.overflow.auth.persistence.converter.AuthInfoEntityConverter;
import com.econovation.overflow.auth.persistence.entity.AuthInfoEntity;
import com.econovation.overflow.auth.persistence.repository.AuthInfoRepository;
import com.econovation.overflow.security.token.TokenProvider;
import com.econovation.overflow.security.token.TokenResolver;
import com.econovation.overflow.support.token.TokenProvider;
import com.econovation.overflow.support.token.TokenResolver;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.econovation.overflow.auth.domain.service.CreateTokenService;
import com.econovation.overflow.auth.persistence.entity.AuthInfoEntity;
import com.econovation.overflow.auth.persistence.repository.AuthInfoRepository;
import com.econovation.overflow.security.token.TokenResolver;
import com.econovation.overflow.support.token.TokenResolver;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.econovation.overflow.auth.web.controller;

import com.econovation.overflow.auth.web.support.AuthorizationExtractor;
import com.econovation.overflow.security.token.TokenValidator;
import com.econovation.overflow.support.token.TokenValidator;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.econovation.overflow.auth.web.support;

import com.econovation.overflow.security.token.TokenResolver;
import com.econovation.overflow.support.token.TokenResolver;
import java.util.Objects;
import javax.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.econovation.overflow.auth.web.controller.AuthInterceptor;
import com.econovation.overflow.auth.web.support.AuthenticationPrincipalArgumentResolver;
import com.econovation.overflow.security.token.TokenResolver;
import com.econovation.overflow.support.token.TokenResolver;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.econovation.overflow.security.exception;
package com.econovation.overflow.support.token;

import com.econovation.overflow.common.exception.BusinessException;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.econovation.overflow.security.token;
package com.econovation.overflow.support.token;

import io.jsonwebtoken.Header;
import io.jsonwebtoken.Jwts;
Expand All @@ -13,7 +13,6 @@
public class TokenProvider {

private static final String USER_ID_CLAIM_KEY = "userId";
private static final String USER_ROLE_CLAIM_KEY = "memberRole";
private final SecretKey secretKey;

private final long accessValidTime;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.econovation.overflow.security.token;
package com.econovation.overflow.support.token;

import com.econovation.overflow.security.exception.NotValidToken;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.ExpiredJwtException;
import io.jsonwebtoken.Jwts;
Expand All @@ -11,7 +10,6 @@
import javax.crypto.SecretKey;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class TokenResolver {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.econovation.overflow.security.token;
package com.econovation.overflow.support.token;

import com.econovation.overflow.auth.domain.exception.AuthorizationException;
import java.util.Date;
Expand Down
4 changes: 2 additions & 2 deletions be/overflow/src/main/resources/application-dev-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ security:
token:
secretKey: asccesssecretkeyoverflowsecrekey
access:
validTime: 1800
validTime: 1800000
refresh:
validTime : 3600
validTime: 3600000

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.econovation.overflow.security.token;
package com.econovation.overflow.support.token;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.econovation.overflow.security.token;
package com.econovation.overflow.support.token;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;

import com.econovation.overflow.security.exception.NotValidToken;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

Expand Down

0 comments on commit 8dbec57

Please sign in to comment.