diff --git a/.gitignore b/.gitignore index a64ca9d..144079c 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,5 @@ out/ ### .env ### .env - ### gradle.properties ### -gradle.properties \ No newline at end of file +gradle.properties diff --git a/build.gradle b/build.gradle index dd3d246..22ba8f3 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,15 @@ repositories { password = System.getenv("GIT_TOKEN") ?: project.findProperty("gpr.key") } } + + maven { + name = 'GitHubPackages' + url = uri('https://maven.pkg.github.com/TeamDoubleO/tenant-context') + credentials { + username = System.getenv("GIT_USERNAME") ?: project.findProperty("gpr.user") + password = System.getenv("GIT_TOKEN") ?: project.findProperty("gpr.key") + } + } } java { toolchain { @@ -74,6 +83,19 @@ dependencies { // Redis implementation 'org.springframework.boot:spring-boot-starter-data-redis' + //gRPC + //모듈 +// implementation "com.doubleo.grpc:tenant-interface:0.0.9.1" + +// //gRPC 런타임 +// implementation "io.grpc:grpc-netty:1.63.0" +// implementation "io.grpc:grpc-protobuf:1.63.0" +// implementation "io.grpc:grpc-stub:1.63.0" +// +// //Spring Boot starter for gRPC 서버/클라이언트 자동설정 +// implementation 'com.google.protobuf:protobuf-java:4.28.2' +// implementation 'net.devh:grpc-spring-boot-starter:3.1.0.RELEASE' + //Tenant-Context implementation 'com.doubleo:tenant-context:0.0.2' diff --git a/src/main/java/com/doubleo/adminservice/global/util/JwtUtil.java b/src/main/java/com/doubleo/adminservice/global/util/JwtUtil.java index c70673f..0ac6b27 100644 --- a/src/main/java/com/doubleo/adminservice/global/util/JwtUtil.java +++ b/src/main/java/com/doubleo/adminservice/global/util/JwtUtil.java @@ -109,6 +109,7 @@ private String buildAccessToken(Long adminId, String tenantId, Date issuedAt, Da .setIssuer(jwtProperties.issuer()) .setSubject(adminId.toString()) .claim("tenantId", tenantId) + .claim("platform", Platform.ADMIN.name()) .setIssuedAt(issuedAt) .setExpiration(expiredAt) .signWith(getAccessTokenKey()) diff --git a/src/main/java/com/doubleo/adminservice/global/util/Platform.java b/src/main/java/com/doubleo/adminservice/global/util/Platform.java new file mode 100644 index 0000000..8ca6a2e --- /dev/null +++ b/src/main/java/com/doubleo/adminservice/global/util/Platform.java @@ -0,0 +1,12 @@ +package com.doubleo.adminservice.global.util; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@Getter +@RequiredArgsConstructor +public enum Platform { + ADMIN("ADMIN"); + + private final String platform; +}