Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ out/

### .env ###
.env

### gradle.properties ###
gradle.properties
gradle.properties
22 changes: 22 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/doubleo/adminservice/global/util/Platform.java
Original file line number Diff line number Diff line change
@@ -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;
}