Skip to content

Commit 0e03b03

Browse files
committed
impl: retrofit API for endpoint discovery and dynamic client registration
1 parent 72a902f commit 0e03b03

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.coder.toolbox.oauth
2+
3+
import retrofit2.Response
4+
import retrofit2.http.Body
5+
import retrofit2.http.GET
6+
import retrofit2.http.POST
7+
import retrofit2.http.Url
8+
9+
interface CoderAuthorizationApi {
10+
@GET(".well-known/oauth-authorization-server")
11+
suspend fun discoveryMetadata(): Response<AuthorizationServer>
12+
13+
@POST
14+
suspend fun registerClient(
15+
@Url url: String,
16+
@Body request: ClientRegistrationRequest
17+
): Response<ClientRegistrationResponse>
18+
}

0 commit comments

Comments
 (0)