Skip to content

Commit

Permalink
Integrate decodeSdJwt method
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliano1612 committed Sep 25, 2024
1 parent 8a7a7d9 commit e38ab86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 52 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.spruceid.mobilesdkexample.wallet

import android.util.Log
import androidx.compose.foundation.Image
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
Expand Down Expand Up @@ -34,23 +33,18 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.spruceid.mobile.sdk.W3CVC
import com.spruceid.mobile.sdk.rs.decodeRevealSdJwt
import com.spruceid.mobilesdkexample.R
import com.spruceid.mobilesdkexample.ui.theme.Bg
import com.spruceid.mobilesdkexample.ui.theme.CredentialBorder
import com.spruceid.mobilesdkexample.ui.theme.GreenValid
import com.spruceid.mobilesdkexample.ui.theme.Inter
import com.spruceid.mobilesdkexample.ui.theme.TextBody
import com.spruceid.mobilesdkexample.ui.theme.TextHeader
import com.spruceid.mobilesdkexample.utils.mockAchievementCredential
import org.json.JSONArray
import org.json.JSONObject
import java.text.SimpleDateFormat
import java.time.LocalDateTime
import java.time.OffsetDateTime
import java.time.format.DateTimeFormatter
import java.util.Date
import java.util.Locale

class AchievementCredentialItem {
private var credential: JSONObject
Expand All @@ -60,8 +54,8 @@ class AchievementCredentialItem {
}

constructor(rawCredential: String) {
// @TODO: remove mock
this.credential = JSONObject(mockAchievementCredential)
val decodedSdJwt = decodeRevealSdJwt(rawCredential)
this.credential = JSONObject(decodedSdJwt)
}

@Composable
Expand Down

0 comments on commit e38ab86

Please sign in to comment.