Skip to content

Commit

Permalink
[MERGE/#41] 구글 유저 생성 시 설정파일 경로 로깅
Browse files Browse the repository at this point in the history
[FIX] #41 - 구글 유저 생성 시 설정파일 경로 로깅
  • Loading branch information
seokbeom00 authored Jul 9, 2024
2 parents 6f7528d + 2b82e9f commit 81fab4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/DOCKER-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
touch ./application.yml
echo "${{ secrets.CD_APPLICATION }}" > ./application.yml
cat ./application.yml
echo "Absolute path of application.yml:"
echo "$(pwd)/application.yml"
working-directory: ${{ env.working-directory }}

- name: Configure AWS credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.sopt.seonyakServer.global.exception.enums.ErrorType;
import org.sopt.seonyakServer.global.exception.model.CustomException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class GoogleMeetConfig {

@Value("${google.credentials.file.path}")
Expand Down Expand Up @@ -71,11 +73,12 @@ public void delete(String id) throws IOException {

@Bean
public UserAuthorizer userAuthorizer(TokenStore tokenStore) throws IOException {
log.info("credentials path: " + credentialsFilePath);
Path credentialsPath = Paths.get(credentialsFilePath);
if (!Files.exists(credentialsPath)) {
throw new CustomException(ErrorType.NOT_FOUND_CREDENTIALS_JSON_ERROR);
}
try (InputStream in = Files.newInputStream(credentialsPath)) {
if (in == null) {
throw new CustomException(ErrorType.NOT_FOUND_CREDENTIALS_JSON_ERROR);
}
ClientId clientId = ClientId.fromStream(in);
return UserAuthorizer.newBuilder()
.setClientId(clientId)
Expand Down

0 comments on commit 81fab4b

Please sign in to comment.