Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6462f14

Browse files
committed
fix: wrong client app registration endpoint
POST /api/v2/oauth2-provider/apps is actually for manual adminregistration for admin created apps. Programmatic Dynamic ClientRegistration is done via `POST /oauth2/register`.At the same time I included `registration_access_token` and `registration_client_uri`to use it later in order to refresh the client secret without re-registering the client app.
1 parent2a28cee commit6462f14

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/main/kotlin/com/coder/toolbox/oauth/ClientRegistrationResponse.kt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@ data class ClientRegistrationResponse(
1717
@field:Json(name = "scope")valscope:String,
1818
@field:Json(name = "token_endpoint_auth_method")valtokenEndpointAuthMethod:String,
1919
@field:Json(name = "client_id_issued_at")valclientIdIssuedAt:Long?,
20-
@field:Json(name = "client_secret_expires_at")valclientSecretExpiresAt:Long?
20+
@field:Json(name = "client_secret_expires_at")valclientSecretExpiresAt:Long?,
21+
@field:Json(name = "registration_client_uri")valregistrationClientUri:String,
22+
@field:Json(name = "registration_access_token")valregistrationAccessToken:String
2123
)

‎src/main/kotlin/com/coder/toolbox/oauth/CoderAuthorizationApi.kt‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ import retrofit2.Response
44
importretrofit2.http.Body
55
importretrofit2.http.GET
66
importretrofit2.http.POST
7-
importretrofit2.http.Url
87

98
interfaceCoderAuthorizationApi {
109
@GET(".well-known/oauth-authorization-server")
1110
suspendfundiscoveryMetadata():Response<AuthorizationServer>
1211

13-
@POST
12+
@POST("oauth2/register")
1413
suspendfunregisterClient(
15-
@Urlurl:String,
1614
@Bodyrequest:ClientRegistrationRequest
1715
):Response<ClientRegistrationResponse>
1816
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp