-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat:支持管理我的 OAUTH #10995 #11250
Merged
Merged
feat:支持管理我的 OAUTH #10995 #11250
Changes from 29 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
4e82c88
feat:支持管理我的 OAUTH #10995
hejieehe 744614e
feat:支持管理我的 OAUTH #10995
hejieehe 8925be2
feat:支持管理我的 OAUTH #10995 增加oauth重置链接接口
hejieehe c3fe4cb
feat:支持管理我的 OAUTH #10995
hejieehe b3f7c46
feat:支持管理我的 OAUTH #10995
hejieehe e2058e3
feat:支持管理我的 OAUTH #10995
hejieehe 74d1e3a
feat:支持管理我的 OAUTH #10995
hejieehe 5c61c57
feat:支持管理我的 OAUTH #10995
hejieehe 2a3cb48
feat:支持管理我的 OAUTH #10995
hejieehe 63c3e58
feat:支持管理我的 OAUTH #10995
hejieehe d7ed4d1
feat:支持管理我的 OAUTH #10995
hejieehe 5d60e5e
feat:支持管理我的 OAUTH #10995
hejieehe e0f3cc2
Merge branch 'master' of https://github.com/TencentBlueKing/bk-ci int…
hejieehe 2fdd804
feat:支持管理我的 OAUTH #10995
hejieehe 7deef32
Merge branch 'master' of https://github.com/TencentBlueKing/bk-ci int…
hejieehe 7720f10
feat:支持管理我的 OAUTH #10995
hejieehe 8de8342
Merge branch 'master' of https://github.com/TencentBlueKing/bk-ci int…
hejieehe 584a43d
feat:支持管理我的 OAUTH #10995
hejieehe d973f7d
feat:支持管理我的 OAUTH #10995
hejieehe 93f2806
feat:支持管理我的 OAUTH #10995
hejieehe 565229f
Merge branch 'master' of https://github.com/TencentBlueKing/bk-ci int…
hejieehe d6952eb
feat:支持管理我的 OAUTH #10995
hejieehe 00925b1
feat:支持管理我的 OAUTH #10995
hejieehe feea1bc
feat:支持管理我的 OAUTH #10995
hejieehe f288e56
feat:支持管理我的 OAUTH #10995
hejieehe d50960b
feat:支持管理我的 OAUTH #10995 补充相关open api接口
hejieehe f8b8f73
Merge branch 'master' of https://github.com/TencentBlueKing/bk-ci int…
hejieehe b34f69d
feat:支持管理我的 OAUTH #10995
hejieehe a9d1b56
feat:支持管理我的 OAUTH #10995
hejieehe 7e369ca
feat:支持管理我的 OAUTH #10995
hejieehe f143351
feat:支持管理我的 OAUTH #10995
hejieehe a1f1570
feat:支持管理我的 OAUTH #10995
hejieehe 47dd397
feat:支持管理我的 OAUTH #10995
hejieehe b64a381
feat:支持管理我的 OAUTH #10995
hejieehe c865d16
feat:支持管理我的 OAUTH #10995 补充SQL
hejieehe 066cc66
feat:支持管理我的 OAUTH #10995
hejieehe 92336f2
feat:支持管理我的 OAUTH #10995
hejieehe ceab5cd
feat:支持管理我的 OAUTH #10995
hejieehe cbcbcc1
feat:支持管理我的 OAUTH #10995
hejieehe 28cbb28
feat:支持管理我的 OAUTH #10995
hejieehe fee0c9e
feat:支持管理我的 OAUTH #10995
hejieehe 3dbd2c5
feat:支持管理我的 OAUTH #10995
hejieehe 4fdd5fb
feat:支持管理我的 OAUTH #10995
hejieehe 81f7307
feat:支持管理我的 OAUTH #10995
hejieehe d2ae618
feat:支持管理我的 OAUTH #10995
hejieehe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
.../ci/core/common/common-api/src/main/kotlin/com/tencent/devops/common/api/enums/ScmCode.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. | ||
* | ||
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. | ||
* | ||
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. | ||
* | ||
* A copy of the MIT License is included in this file. | ||
* | ||
* | ||
* Terms of the MIT License: | ||
* --------------------------------------------------- | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | ||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of | ||
* the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT | ||
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | ||
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
package com.tencent.devops.common.api.enums | ||
|
||
/** | ||
* 代码库类型 | ||
*/ | ||
enum class ScmCode { | ||
TGIT, // 内部工蜂 | ||
GITHUB; // github | ||
|
||
fun convertScmType(): ScmType { | ||
return when (this) { | ||
TGIT -> ScmType.CODE_GIT | ||
GITHUB -> ScmType.GITHUB | ||
} | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
...i-openapi/src/main/kotlin/com/tencent/devops/openapi/api/apigw/v4/ApigwOauthResourceV4.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. | ||
* | ||
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. | ||
* | ||
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. | ||
* | ||
* A copy of the MIT License is included in this file. | ||
* | ||
* | ||
* Terms of the MIT License: | ||
* --------------------------------------------------- | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | ||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of | ||
* the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT | ||
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | ||
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package com.tencent.devops.openapi.api.apigw.v4 | ||
|
||
import com.tencent.devops.common.api.auth.AUTH_HEADER_DEVOPS_APP_CODE | ||
import com.tencent.devops.common.api.auth.AUTH_HEADER_DEVOPS_APP_CODE_DEFAULT_VALUE | ||
import com.tencent.devops.common.api.auth.AUTH_HEADER_DEVOPS_USER_ID | ||
import com.tencent.devops.common.api.auth.AUTH_HEADER_DEVOPS_USER_ID_DEFAULT_VALUE | ||
import com.tencent.devops.common.api.pojo.Result | ||
import io.swagger.v3.oas.annotations.Operation | ||
import io.swagger.v3.oas.annotations.Parameter | ||
import io.swagger.v3.oas.annotations.tags.Tag | ||
import javax.ws.rs.Consumes | ||
import javax.ws.rs.HeaderParam | ||
import javax.ws.rs.PUT | ||
import javax.ws.rs.Path | ||
import javax.ws.rs.PathParam | ||
import javax.ws.rs.Produces | ||
import javax.ws.rs.QueryParam | ||
import javax.ws.rs.core.MediaType | ||
|
||
@Tag(name = "OPEN_API_REPOSITORY_V4", description = "OPEN-API-OAUTH授权资源") | ||
@Path("/{apigwType:apigw-user|apigw-app|apigw}/v4/oauth") | ||
@Produces(MediaType.APPLICATION_JSON) | ||
@Consumes(MediaType.APPLICATION_JSON) | ||
@SuppressWarnings("All") | ||
interface ApigwOauthResourceV4 { | ||
@Operation( | ||
summary = "校验用户是否已经OAUTH授权", | ||
tags = ["v4_app_oauth_isOauth", "v4_user_oauth_isOauth"] | ||
) | ||
@PUT | ||
@Path("/isOauth") | ||
fun isOauth( | ||
@Parameter(description = "appCode", required = true, example = AUTH_HEADER_DEVOPS_APP_CODE_DEFAULT_VALUE) | ||
@HeaderParam(AUTH_HEADER_DEVOPS_APP_CODE) | ||
appCode: String?, | ||
@Parameter(description = "apigw Type", required = true) | ||
@PathParam("apigwType") | ||
apigwType: String?, | ||
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_DEVOPS_USER_ID_DEFAULT_VALUE) | ||
@HeaderParam(AUTH_HEADER_DEVOPS_USER_ID) | ||
userId: String, | ||
@Parameter(description = "代码库类型", required = true) | ||
@QueryParam("scmCode") | ||
scmCode: String | ||
): Result<Boolean> | ||
} |
73 changes: 73 additions & 0 deletions
73
...src/main/kotlin/com/tencent/devops/openapi/resources/apigw/v4/ApigwOauthResourceV4Impl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. | ||
* | ||
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. | ||
* | ||
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. | ||
* | ||
* A copy of the MIT License is included in this file. | ||
* | ||
* | ||
* Terms of the MIT License: | ||
* --------------------------------------------------- | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | ||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of | ||
* the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT | ||
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | ||
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package com.tencent.devops.openapi.resources.apigw.v4 | ||
|
||
import com.tencent.devops.common.api.enums.ScmCode | ||
import com.tencent.devops.common.api.pojo.Result | ||
import com.tencent.devops.common.client.Client | ||
import com.tencent.devops.common.web.RestResource | ||
import com.tencent.devops.openapi.api.apigw.v4.ApigwOauthResourceV4 | ||
import com.tencent.devops.repository.api.ServiceOauthResource | ||
import org.slf4j.LoggerFactory | ||
import org.springframework.beans.factory.annotation.Autowired | ||
|
||
@RestResource | ||
class ApigwOauthResourceV4Impl @Autowired constructor(private val client: Client) : ApigwOauthResourceV4 { | ||
override fun isOauth( | ||
appCode: String?, | ||
apigwType: String?, | ||
userId: String, | ||
scmCode: String | ||
): Result<Boolean> { | ||
logger.info("OPENAPI_OAUTH_V4|$userId|verify if $scmCode oauth authorization has been performed") | ||
val result = when (scmCode) { | ||
ScmCode.TGIT.name -> { | ||
client.get(ServiceOauthResource::class).isOAuth( | ||
userId = userId, | ||
redirectUrl = null, | ||
redirectUrlType = null | ||
).data?.status | ||
} | ||
|
||
ScmCode.GITHUB.name -> { | ||
client.get(ServiceOauthResource::class).githubOAuth( | ||
userId = userId | ||
).data?.status | ||
} | ||
|
||
else -> { | ||
null | ||
} | ||
} | ||
return Result(result == AUTHORIZED_STATUS) | ||
} | ||
|
||
companion object { | ||
private val logger = LoggerFactory.getLogger(ApigwOauthResourceV4Impl::class.java) | ||
private const val AUTHORIZED_STATUS = 200 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
...ory/api-repository/src/main/kotlin/com/tencent/devops/repository/api/UserOauthResource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/* | ||
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. | ||
* | ||
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. | ||
* | ||
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. | ||
* | ||
* A copy of the MIT License is included in this file. | ||
* | ||
* | ||
* Terms of the MIT License: | ||
* --------------------------------------------------- | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | ||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of | ||
* the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT | ||
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | ||
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
*/ | ||
|
||
package com.tencent.devops.repository.api | ||
|
||
import com.tencent.devops.common.api.auth.AUTH_HEADER_USER_ID | ||
import com.tencent.devops.common.api.pojo.Page | ||
import com.tencent.devops.common.api.pojo.Result | ||
import com.tencent.devops.repository.pojo.OauthResetUrl | ||
import com.tencent.devops.repository.pojo.RepoOauthRefVo | ||
import com.tencent.devops.repository.pojo.UserOauthRepositoryInfo | ||
import io.swagger.v3.oas.annotations.Operation | ||
import io.swagger.v3.oas.annotations.Parameter | ||
import io.swagger.v3.oas.annotations.tags.Tag | ||
import javax.ws.rs.Consumes | ||
import javax.ws.rs.DELETE | ||
import javax.ws.rs.GET | ||
import javax.ws.rs.HeaderParam | ||
import javax.ws.rs.POST | ||
import javax.ws.rs.Path | ||
import javax.ws.rs.Produces | ||
import javax.ws.rs.QueryParam | ||
import javax.ws.rs.core.MediaType | ||
|
||
@Tag(name = "AUTH_RESOURCE", description = "用户态-iam资源映射") | ||
@Path("/user/repositories/oauth/") | ||
@Produces(MediaType.APPLICATION_JSON) | ||
@Consumes(MediaType.APPLICATION_JSON) | ||
interface UserOauthResource { | ||
@GET | ||
@Path("/") | ||
@Operation(summary = "获取用户OAuth授权列表") | ||
fun list( | ||
@Parameter(description = "用户名", required = true) | ||
@HeaderParam(AUTH_HEADER_USER_ID) | ||
userId: String | ||
): Result<List<UserOauthRepositoryInfo>> | ||
|
||
@GET | ||
@Path("/relSource") | ||
@Operation(summary = "获取授权关联的资源列表") | ||
fun relSource( | ||
@Parameter(description = "用户名", required = true) | ||
@HeaderParam(AUTH_HEADER_USER_ID) | ||
userId: String, | ||
@Parameter(description = "授权类型", required = true) | ||
@QueryParam("scmCode") | ||
scmCode: String, | ||
@Parameter(description = "第几页", required = false, example = "1") | ||
@QueryParam("page") | ||
page: Int? = null, | ||
@Parameter(description = "每页多少条", required = false, example = "20") | ||
@QueryParam("pageSize") | ||
pageSize: Int? = null | ||
): Result<Page<RepoOauthRefVo>> | ||
|
||
@DELETE | ||
@Path("/delete") | ||
@Operation(summary = "删除oauth授权") | ||
fun delete( | ||
@Parameter(description = "用户名", required = true) | ||
@HeaderParam(AUTH_HEADER_USER_ID) | ||
userId: String, | ||
@Parameter(description = "授权类型", required = true) | ||
@QueryParam("scmCode") | ||
scmCode: String | ||
): Result<Boolean> | ||
|
||
@POST | ||
@Path("/reset") | ||
@Operation(summary = "重置授权") | ||
fun reset( | ||
@Parameter(description = "用户名", required = true) | ||
@HeaderParam(AUTH_HEADER_USER_ID) | ||
userId: String, | ||
@Parameter(description = "授权类型", required = true) | ||
@QueryParam("scmCode") | ||
scmCode: String, | ||
@Parameter(description = "回调链接(授权完以后的链接地址)", required = true) | ||
@QueryParam("redirectUrl") | ||
redirectUrl: String | ||
): Result<OauthResetUrl> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...sitory/api-repository/src/main/kotlin/com/tencent/devops/repository/pojo/OauthResetUrl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.tencent.devops.repository.pojo | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
@Schema(title = "重置Oauth授权信息") | ||
data class OauthResetUrl( | ||
val url: String | ||
) |
15 changes: 15 additions & 0 deletions
15
...itory/api-repository/src/main/kotlin/com/tencent/devops/repository/pojo/RepoOauthRefVo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.tencent.devops.repository.pojo | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
@Schema(title = "用户关联的仓库") | ||
data class RepoOauthRefVo( | ||
@get:Schema(title = "仓库别名", required = true) | ||
val aliasName: String, | ||
@get:Schema(title = "仓库源URL", required = true) | ||
val url: String, | ||
@get:Schema(title = "蓝盾项目ID", required = true) | ||
val projectId: String, | ||
@get:Schema(title = "代码库HashId", required = true) | ||
val hashId: String | ||
) |
20 changes: 20 additions & 0 deletions
20
...-repository/src/main/kotlin/com/tencent/devops/repository/pojo/UserOauthRepositoryInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.tencent.devops.repository.pojo | ||
|
||
import com.tencent.devops.common.api.enums.ScmCode | ||
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
@Schema(title = "用户代码库Oauth授权信息") | ||
data class UserOauthRepositoryInfo( | ||
@get:Schema(title = "授权账号") | ||
val username: String, | ||
@get:Schema(title = "授权代码库数量") | ||
val repoCount: Long, | ||
@get:Schema(title = "创建时间") | ||
val createTime: Long? = null, | ||
@get:Schema(title = "授权类型") | ||
val type: ScmCode, | ||
@get:Schema(title = "是否过期") | ||
val expired: Boolean = false, | ||
@get:Schema(title = "是否已授权") | ||
val authorized: Boolean = true | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类名也加上repository