Skip to content

Commit

Permalink
Merge pull request #256 from RADAR-base/release-4.4.1
Browse files Browse the repository at this point in the history
Release 4.4.1
  • Loading branch information
mpgxvii authored Jan 25, 2024
2 parents 4243cbb + 5067214 commit bdb6fa4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ data class OuraAuthUserId(
val age: Int,
val weight: Float,
val height: Float,
val gender: String,
val biological_sex: String,
val email: String,
@SerialName("user_id") val userId: String,
@SerialName("id") val userId: String,
)

data class SignRequestParams(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import io.ktor.client.call.body
import io.ktor.client.request.basicAuth
import io.ktor.client.request.forms.submitForm
import io.ktor.client.request.get
import io.ktor.client.request.headers
import io.ktor.client.request.url
import io.ktor.client.statement.bodyAsText
import io.ktor.http.HttpHeaders
import io.ktor.http.isSuccess
import io.ktor.http.takeFrom
import jakarta.ws.rs.core.Context
Expand Down Expand Up @@ -77,9 +79,9 @@ class OuraAuthorizationService(
private suspend fun getExternalId(accessToken: String): String = withContext(Dispatchers.IO) {
try {
val response = httpClient.get {
url {
takeFrom(OURA_USER_ID_ENDPOINT)
parameters.append("access_token", accessToken)
url(OURA_USER_ID_ENDPOINT)
headers {
append(HttpHeaders.Authorization, "Bearer $accessToken")
}
}
if (response.status.isSuccess()) {
Expand All @@ -99,6 +101,6 @@ class OuraAuthorizationService(
}

companion object {
private const val OURA_USER_ID_ENDPOINT = "https://api.ouraring.com/v1/userinfo"
private const val OURA_USER_ID_ENDPOINT = "https://api.ouraring.com/v2/usercollection/personal_info"
}
}
2 changes: 1 addition & 1 deletion authorizer-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "authorizer-app",
"version": "4.4.0",
"version": "4.4.1",
"description": "Simple app to authorize to collect data from third party services ",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@Suppress("ConstPropertyName")
object Versions {
const val project = "4.4.0"
const val project = "4.4.1"

const val java = 17

Expand Down

0 comments on commit bdb6fa4

Please sign in to comment.