Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WD-136] update maven metadata #90

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ systemProp.sonar.host.url=https://sonarcloud.io
systemProp.sonar.gradle.skipCompile=true
systemProp.sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/testDebugUnitTestCoverage/testDebugUnitTestCoverage.xml,build/reports/jacoco/testReleaseUnitTestCoverage/testReleaseUnitTestCoverage.xml
systemProp.sonar.projectName=eudi-lib-android-wallet-core
VERSION_NAME=0.11.1-SNAPSHOT
VERSION_NAME=0.0.1-SNAPSHOT

SONATYPE_HOST=S01
SONATYPE_AUTOMATIC_RELEASE=false
Expand All @@ -55,12 +55,12 @@ POM_ARTIFACT_ID=eudi-lib-android-wallet-core
POM_NAME=eudi-lib-android-wallet-core

POM_DESCRIPTION=EUDI Wallet Core library for Android
POM_URL=https://github.com/eu-digital-identity-wallet/eudi-lib-android-wallet-core
POM_URL=https://github.com/german-first-iteration/eudi-lib-android-wallet-core
POM_LICENSE_NAME=The Apache License, Version 2.0
POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
POM_SCM_URL=https://github.com/eu-digital-identity-wallet/eudi-lib-android-wallet-core
POM_SCM_CONNECTION=scm:git:[email protected]:eu-digital-identity-wallet/eudi-lib-android-wallet-core.git'
POM_SCM_DEV_CONNECTION=scm:git:ssh://github.com:eu-digital-identity-wallet/eudi-lib-android-wallet-core.git'
POM_SCM_URL=https://github.com/german-first-iteration/eudi-lib-android-wallet-core
POM_SCM_CONNECTION=scm:git:[email protected]:german-first-iteration/eudi-lib-android-wallet-core.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://github.com:german-first-iteration/eudi-lib-android-wallet-core.git
POM_ISSUE_SYSTEM=github
POM_ISSUE_URL=https://github.com/eu-digital-identity-wallet/eudi-lib-android-wallet-core/issues
POM_DEVELOPER_URL=https://github.com/eu-digital-identity-wallet
POM_ISSUE_URL=https://github.com/german-first-iteration/eudi-lib-android-wallet-core/issues
POM_DEVELOPER_URL=https://github.com/german-first-iteration
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import android.net.Uri
import eu.europa.ec.eudi.openid4vci.DefaultHttpClientFactory
import eu.europa.ec.eudi.openid4vci.DeferredIssuer
import eu.europa.ec.eudi.wallet.document.*
import eu.europa.ec.eudi.wallet.issue.openidvci.PARResponse
import eu.europa.ec.eudi.wallet.issue.openidvci.PKCEVerifier
import eu.europa.ec.eudi.wallet.internal.mainExecutor
import eu.europa.ec.eudi.wallet.issue.openid4vci.IssueEvent.Companion.failure
import eu.europa.ec.eudi.wallet.logging.Logger
Expand Down Expand Up @@ -187,6 +189,17 @@ internal class DefaultOpenId4VciManager(
resumeWithAuthorization(Uri.parse(uri))
}

override suspend fun performPushAuthorizationRequest(docType: String): PARResponse {
val offer = offerCreator.createOffer(docType)
val issuer = issuerCreator.createIssuer(offer)
val parResponse = issuerAuthorization.performPushAuthorizationRequest(issuer)
return PARResponse(
authorizationCodeURL = parResponse.authorizationCodeURL.value,
pkceVerifier = PKCEVerifier(codeVerifier = parResponse.pkceVerifier.codeVerifier, codeVerifierMethod = parResponse.pkceVerifier.codeVerifierMethod),
state = parResponse.state
)
}

/**
* Issues the given [Offer].
*/
Expand All @@ -195,7 +208,6 @@ internal class DefaultOpenId4VciManager(
txCode: String?,
listener: OpenId4VciManager.OnResult<IssueEvent>,
) {
offer as DefaultOffer
val issuer = issuerCreator.createIssuer(offer)
var authorizedRequest = issuerAuthorization.authorize(issuer, txCode)
listener(IssueEvent.Started(offer.offeredDocuments.size))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ internal class IssuerAuthorization(

var continuation: CancellableContinuation<Result<Response>>? = null

suspend fun performPushAuthorizationRequest(issuer: Issuer): AuthorizationRequestPrepared {
return issuer.prepareAuthorizationRequest().getOrThrow()
}

/**
* Authorizes the given [Issuer] and returns the authorized request.
* If txCode is provided, it will be used to authorize the issuer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ package eu.europa.ec.eudi.wallet.issue.openid4vci
import android.content.Context
import android.net.Uri
import androidx.annotation.IntDef
import eu.europa.ec.eudi.openid4vci.AuthorizationRequestPrepared
import eu.europa.ec.eudi.wallet.document.DeferredDocument
import eu.europa.ec.eudi.wallet.document.DocumentManager
import eu.europa.ec.eudi.wallet.issue.openid4vci.OpenId4VciManager.Config.ParUsage.Companion.IF_SUPPORTED
import eu.europa.ec.eudi.wallet.issue.openid4vci.OpenId4VciManager.Config.ParUsage.Companion.NEVER
import eu.europa.ec.eudi.wallet.issue.openid4vci.OpenId4VciManager.Config.ParUsage.Companion.REQUIRED
import eu.europa.ec.eudi.wallet.issue.openidvci.PARResponse
import eu.europa.ec.eudi.wallet.logging.Logger
import io.ktor.client.*
import java.util.concurrent.Executor
Expand Down Expand Up @@ -377,4 +379,6 @@ interface OpenId4VciManager {
fun make(block: Builder.() -> Unit) = Builder().apply(block).build()
}
}

suspend fun performPushAuthorizationRequest(docType: String): PARResponse
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package eu.europa.ec.eudi.wallet.issue.openidvci

import java.net.URL

data class PARResponse (
val authorizationCodeURL: URL,
val pkceVerifier: PKCEVerifier,
val state: String,
)

data class PKCEVerifier(
val codeVerifier: String,
val codeVerifierMethod: String,
)
Loading