com.onfido.api.client.token.sdk.InternalSDKToken.kt Maven / Gradle / Ivy
package com.onfido.api.client.token.sdk
import com.onfido.api.client.exception.InternalEnterpriseFeaturesNotAuthorizedException
import com.onfido.api.client.getJsonParserInstance
import com.onfido.api.client.token.InternalToken
import com.onfido.api.client.token.sdk.model.InternalSDKTokenPayload
import com.onfido.api.client.token.sdk.url.ApiUrlCreator
import com.onfido.api.client.token.sdk.url.ApiUrlCreatorImpl
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlinx.serialization.json.jsonObject
public class InternalSDKToken @JvmOverloads constructor(
tokenValue: String,
appId: String?,
urlCreator: ApiUrlCreator = ApiUrlCreatorImpl()
) : InternalToken(tokenValue) {
private val urlCreator: ApiUrlCreator
private var sdkTokenPayload: InternalSDKTokenPayload? = null
@Transient
private val jsonParser: Json = getJsonParserInstance()
val enterpriseFeatures: Map
get() {
val json = InternalSDKTokenExtractor.decodePayload(tokenValue)
val tokenMap = jsonParser
.decodeFromString
© 2015 - 2025 Weber Informatics LLC | Privacy Policy