Skip to content

Commit 62bb023

Browse files
committed
chore: move token type enum into auth package inside airbyte-data (#16749)
1 parent 684f129 commit 62bb023

File tree

11 files changed

+12
-12
lines changed

11 files changed

+12
-12
lines changed

airbyte-commons-server/src/main/kotlin/io/airbyte/commons/server/authorization/RoleResolver.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import io.airbyte.commons.server.support.CurrentUserService
2020
import io.airbyte.config.Permission
2121
import io.airbyte.config.Permission.PermissionType
2222
import io.airbyte.config.helpers.PermissionHelper
23-
import io.airbyte.data.TokenType
23+
import io.airbyte.data.auth.TokenType
2424
import io.airbyte.featureflag.FeatureFlagClient
2525
import io.airbyte.featureflag.IgnoreTokenRoleClaims
2626
import io.airbyte.featureflag.TokenSubject

airbyte-commons-server/src/test/kotlin/io/airbyte/commons/server/authorization/RoleResolverTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import io.airbyte.commons.server.support.CurrentUserService
1313
import io.airbyte.config.AuthenticatedUser
1414
import io.airbyte.config.Permission
1515
import io.airbyte.config.persistence.UserPersistence
16-
import io.airbyte.data.TokenType
16+
import io.airbyte.data.auth.TokenType
1717
import io.airbyte.featureflag.FeatureFlagClient
1818
import io.airbyte.persistence.job.WorkspaceHelper
1919
import io.micronaut.http.HttpRequest

airbyte-data/src/main/kotlin/io/airbyte/data/auth/AirbyteJwtGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
package io.airbyte.data.auth
66

7-
import io.airbyte.data.TokenType
7+
import io.airbyte.data.auth.TokenType
88

99
/**
1010
* AirbyteJwtGenerator provides an interface for generating an encoded JWT token.

airbyte-data/src/main/kotlin/io/airbyte/data/auth/AirbyteJwtGeneratorImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
package io.airbyte.data.auth
66

7-
import io.airbyte.data.TokenType
7+
import io.airbyte.data.auth.TokenType
88
import io.micronaut.context.annotation.Property
99
import io.micronaut.context.annotation.Replaces
1010
import io.micronaut.context.annotation.Requires

airbyte-data/src/main/kotlin/io/airbyte/data/auth/AirbyteJwtGeneratorNoAuthImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package io.airbyte.data.auth
66

77
import io.airbyte.commons.json.Jsons
8-
import io.airbyte.data.TokenType
8+
import io.airbyte.data.auth.TokenType
99
import io.micronaut.context.annotation.Requires
1010
import jakarta.inject.Singleton
1111
import java.time.Clock

airbyte-data/src/main/kotlin/io/airbyte/data/TokenType.kt renamed to airbyte-data/src/main/kotlin/io/airbyte/data/auth/TokenType.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2020-2025 Airbyte, Inc., all rights reserved.
33
*/
44

5-
package io.airbyte.data
5+
package io.airbyte.data.auth
66

77
/**
88
* TokenType describes the various types of auth (JWT) tokens we use in Airbyte.
@@ -39,7 +39,7 @@ enum class TokenType {
3939
fun fromClaims(claims: Map<String, Any>): TokenType {
4040
val claimedType = claims["typ"] as? String
4141
if (claimedType != null) {
42-
for (it in TokenType.entries) {
42+
for (it in entries) {
4343
if (claimedType == it.toClaim().second) {
4444
return it
4545
}

airbyte-data/src/main/kotlin/io/airbyte/data/services/ServiceAccountsService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
package io.airbyte.data.services
66

77
import io.airbyte.commons.auth.config.TokenExpirationConfig
8-
import io.airbyte.data.TokenType
98
import io.airbyte.data.auth.AirbyteJwtGenerator
9+
import io.airbyte.data.auth.TokenType
1010
import io.airbyte.data.repositories.ServiceAccountsRepository
1111
import io.airbyte.domain.models.ServiceAccount
1212
import jakarta.inject.Singleton

airbyte-data/src/main/kotlin/io/airbyte/data/services/impls/data/DataplaneTokenServiceDataImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package io.airbyte.data.services.impls.data
66

77
import io.airbyte.commons.auth.config.TokenExpirationConfig
88
import io.airbyte.commons.auth.roles.AuthRole
9-
import io.airbyte.data.TokenType
9+
import io.airbyte.data.auth.TokenType
1010
import io.airbyte.data.services.DataplaneTokenService
1111
import io.airbyte.data.services.ServiceAccountsService
1212
import io.micronaut.context.annotation.Property

airbyte-data/src/test/kotlin/io/airbyte/data/services/impls/data/ServiceAccountsServiceTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
package io.airbyte.data.services.impls.data
66

77
import com.nimbusds.jwt.JWTParser
8-
import io.airbyte.data.TokenType
98
import io.airbyte.data.auth.AirbyteJwtGeneratorNoAuthImpl
9+
import io.airbyte.data.auth.TokenType
1010
import io.airbyte.data.repositories.AbstractConfigRepositoryTest
1111
import io.airbyte.data.services.ServiceAccountsService
1212
import io.micronaut.test.extensions.junit5.annotation.MicronautTest

airbyte-server/src/main/kotlin/io/airbyte/server/apis/publicapi/controllers/EmbeddedController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import io.airbyte.commons.server.handlers.OrganizationsHandler
1515
import io.airbyte.commons.server.handlers.PermissionHandler
1616
import io.airbyte.commons.server.scheduling.AirbyteTaskExecutors
1717
import io.airbyte.commons.server.support.CurrentUserService
18-
import io.airbyte.data.TokenType
18+
import io.airbyte.data.auth.TokenType
1919
import io.airbyte.domain.models.OrganizationId
2020
import io.airbyte.publicApi.server.generated.apis.EmbeddedWidgetApi
2121
import io.airbyte.publicApi.server.generated.models.EmbeddedOrganizationListItem

0 commit comments

Comments
 (0)