in authentication/src/main/kotlin/com/uber/sdk2/auth/internal/service/AuthService.kt [41:68]
suspend fun loginParRequest(
@Field("client_id") clientId: String,
@Field("response_type") responseType: String,
@Field("login_hint") prefillInfoString: String,
@Field("scope") scope: String,
): Response<PARResponse>
@FormUrlEncoded
@POST("/oauth/v2/token")
suspend fun token(
@Field("client_id") clientId: String?,
@Field("code_verifier") codeVerifier: String?,
@Field("grant_type") grantType: String?,
@Field("redirect_uri") redirectUri: String?,
@Field("code") authCode: String?,
): Response<UberToken>
companion object {
/** Creates an instance of [AuthService]. */
fun create(): AuthService {
val moshi = Moshi.Builder().addLast(KotlinJsonAdapterFactory()).build()
return Retrofit.Builder()
.baseUrl(UriConfig.getAuthHost())
.addConverterFactory(MoshiConverterFactory.create(moshi))
.build()
.create(AuthService::class.java)
}
}