diff --git a/README.md b/README.md index 95d7bb1b..8b4e06f1 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,7 @@ import eu.europa.ec.eudi.wallet.EudiWallet import eu.europa.ec.eudi.wallet.EudiWalletConfig import eu.europa.ec.eudi.wallet.Logger import java.security.cert.X509Certificate + val logger = Logger { record: Logger.Record -> // log the record } @@ -450,7 +451,10 @@ the [Initialize the library](#initialize-the-library) section. #### Resolving Credential offer -The library provides the `EudiWallet.resolveDocumentOffer` method that resolves the credential offer URI. +First, you need an instance of the `OpenId4VciManager` class. You can create an instance of the class by calling +the `EudiWallet.createOpenId4VciManager` method. + +The library provides the `OpenId4VciManager.resolveDocumentOffer` method that resolves the credential offer URI. The method returns the resolved [`Offer`](wallet-core/src/main/java/eu/europa/ec/eudi/wallet/issue/openid4vci/Offer.kt) object that contains the offer's data. The offer's data can be displayed to the user. @@ -459,7 +463,9 @@ The following example shows how to resolve a credential offer: ```kotlin val offerUri = "https://issuer.com/?credential_offer=..." -EudiWallet.resolveDocumentOffer(offerUri) { result -> +// Create an instance of OpenId4VciManager +val openId4VciManager = EudiWallet.createOpenId4VciManager() +openId4VciManager.resolveDocumentOffer(offerUri) { result -> when (result) { is OfferResult.Success -> { @@ -478,26 +484,31 @@ EudiWallet.resolveDocumentOffer(offerUri) { result -> } ``` -There is also the availability for the `EudiWallet.resolveDocumentOffer` method to specify the executor in which the +There is also the availability for the `OpenId4VciManager.resolveDocumentOffer` method to specify the executor in which +the onResolvedOffer callback is executed, by assigning the `executor` parameter. If the `executor` parameter is null, the callback will be executed on the main thread. ```kotlin val executor = Executors.newSingleThreadExecutor() -EudiWallet.resolveDocumentOffer(offerUri, executor) { result -> +openId4VciManager.resolveDocumentOffer(offerUri, executor) { result -> // ... } ``` #### Issuing a document +First, you need an instance of the `OpenId4VciManager` class. You can create an instance of the class by calling +the `EudiWallet.createOpenId4VciManager` method. + There are two ways to issue a document using OpenID4VCI: -1. Using the `EudiWallet.issueDocumentByDocType` method, when the document's docType is known. -2. Using the `EudiWallet.issueDocumentByOffer` or `EudiWallet.issueDocumentByOfferUri` methods, when an OpenId4VCI offer +1. Using the `OpenId4VciManager.issueDocumentByDocType` method, when the document's docType is known. +2. Using the `OpenId4VciManager.issueDocumentByOffer` or `OpenId4VciManager.issueDocumentByOfferUri` methods, when an + OpenId4VCI offer is given. -_Important Notes_: +__Important note__: - Currently, only mso_mdoc format is supported - Currently, only the ES256 algorithm is supported for signing OpenId4CVI proof of possession of the @@ -567,23 +578,25 @@ val onIssueEvent = OnIssueEvent { event -> } } } +// Create an instance of OpenId4VciManager +val openId4VciManager = EudiWallet.createOpenId4VciManager() -EudiWallet.issueDocumentByDocType( +openId4VciManager.issueDocumentByDocType( docType = "eu.europa.ec.eudi.pid.1", txCode = "", // if transaction code is provided - onEvent = onIssueEvent + onIssueEvent = onIssueEvent ) // or -EudiWallet.issueDocumentByOfferUri( +openId4VciManager.issueDocumentByOfferUri( offerUri = "https://issuer.com/?credential_offer=...", txCode = "", // if transaction code is provided - onEvent = onIssueEvent + onIssueEvent = onIssueEvent ) // or given a resolved offer object -EudiWallet.issueDocumentByOffer( +openId4VciManager.issueDocumentByOffer( offer = offer, txCode = "", // if transaction code is provided - onEvent = onIssueEvent + onIssueEvent = onIssueEvent ) ``` @@ -592,8 +605,12 @@ specify the executor in which the onIssueEvent callback is executed, by assignin If the `executor` parameter is null, the callback will be executed on the main thread. ```kotlin + +// Create an instance of OpenId4VciManager +val openId4VciManager = EudiWallet.createOpenId4VciManager() + val executor = Executors.newSingleThreadExecutor() -EudiWallet.issueDocumentByDocType( +openId4VciManager.issueDocumentByDocType( docType = "eu.europa.ec.eudi.pid.1", executor = executor ) { event -> @@ -605,9 +622,16 @@ EudiWallet.issueDocumentByDocType( For the authorization code flow to work, the application must handle the redirect URI. The redirect URI is the URI that the Issuer will redirect the user to after the user has authenticated and authorized. The redirect URI must be handled -by the application and resume the issuance process by calling the `EudiWallet.resumeOpenId4VciWithAuthorization`. +by the application and resume the issuance process by calling the `OpenId4VciManager.resumeWithAuthorization`. Also, the redirect uri declared in the OpenId4VCI configuration must be declared in the application's manifest file. +__Important note__: The `resumeWithAuthorization` method must be called from the same OpenId4VciManager instance +that was used to start the issuance process. You will need to keep the reference of the `OpenId4VciManager` instance +that +was used for calling the `issueDocumentByDocType`, `issueDocumentByOfferUri` or `issueDocumentByOffer` method and use +this +same instance to call the `resumeWithAuthorization` method. + ```xml @@ -644,15 +668,23 @@ EudiWalletConfig.Builder(applicationContext) ``` ```kotlin +import javax.management.openmbean.OpenMBeanInfo class SomeActivity : AppCompatActivity() { + + val openId4VciManager: OpenId4VciManager + get() { + // get the OpenId4VciManager instance that was created during the issuance process + // ... + } + // ... override fun onResume() { super.onResume() // check if intent is from the redirect uri to resume the issuance process // ... // then call - EudiWallet.resumeOpenId4VciWithAuthorization(intent) + intent.data?.let { uri -> openId4VciManager.resumeWithAuthorization(uri) } } // ... } @@ -680,12 +712,13 @@ passing the transaction code as in the `txCode` parameter. #### Deferred Issuance When the document issuance is deferred, the `IssueEvent.DocumentDeferred` event is triggered. The deferred document can -be issued later by calling the `EudiWallet.issueDeferredDocument` method. +be issued later by calling the `OpenId4VciManager.issueDeferredDocument` method. ```kotlin val documentId = "documentId" +val openId4VciManager: OpenId4VciManager = EudiWallet.createOpenId4VciManager() -EudiWallet.issueDeferredDocument(documentId) { result -> +openId4VciManager.issueDeferredDocument(documentId) { result -> when (result) { is DeferredIssueResult.DocumentIssued -> { // document issued @@ -697,6 +730,9 @@ EudiWallet.issueDeferredDocument(documentId) { result -> is DeferredIssueResult.DocumentNotReady -> { // The document is not issued yet } + is DeferredIssueResult.DocumentExpired -> { + // The document is expired and cannot be issued + } } } ``` diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/-document-expired.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/-document-expired.md new file mode 100644 index 00000000..be19829e --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/-document-expired.md @@ -0,0 +1,8 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.issue.openid4vci](../../index.md)/[DeferredIssueResult](../index.md)/[DocumentExpired](index.md)/[DocumentExpired](-document-expired.md) + +# DocumentExpired + +[androidJvm]\ +constructor(documentId: DocumentId, +name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), +docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/doc-type.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/doc-type.md new file mode 100644 index 00000000..37b136c4 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/doc-type.md @@ -0,0 +1,7 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.issue.openid4vci](../../index.md)/[DeferredIssueResult](../index.md)/[DocumentExpired](index.md)/[docType](doc-type.md) + +# docType + +[androidJvm]\ +open override +val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/document-id.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/document-id.md new file mode 100644 index 00000000..27ee4e9b --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/document-id.md @@ -0,0 +1,6 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.issue.openid4vci](../../index.md)/[DeferredIssueResult](../index.md)/[DocumentExpired](index.md)/[documentId](document-id.md) + +# documentId + +[androidJvm]\ +open override val [documentId](document-id.md): DocumentId diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/index.md new file mode 100644 index 00000000..b7006e7a --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/index.md @@ -0,0 +1,24 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.issue.openid4vci](../../index.md)/[DeferredIssueResult](../index.md)/[DocumentExpired](index.md) + +# DocumentExpired + +[androidJvm]\ +data class [DocumentExpired](index.md)(val documentId: DocumentId, val +name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val +docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) : [DeferredIssueResult](../index.md) + +Document issuance expired. + +## Constructors + +| | | +|-----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [DocumentExpired](-document-expired.md) | [androidJvm]
constructor(documentId: DocumentId, name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) | + +## Properties + +| Name | Summary | +|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [docType](doc-type.md) | [androidJvm]
open override val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the document type | +| [documentId](document-id.md) | [androidJvm]
open override val [documentId](document-id.md): DocumentId
the id of the expired document | +| [name](name.md) | [androidJvm]
open override val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the name of the document | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/name.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/name.md new file mode 100644 index 00000000..b93952f8 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/name.md @@ -0,0 +1,6 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.issue.openid4vci](../../index.md)/[DeferredIssueResult](../index.md)/[DocumentExpired](index.md)/[name](name.md) + +# name + +[androidJvm]\ +open override val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/-document-failed.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/-document-failed.md index 24d02838..e0cc89f1 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/-document-failed.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/-document-failed.md @@ -4,4 +4,6 @@ [androidJvm]\ constructor(documentId: DocumentId, +name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), +docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), cause: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/doc-type.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/doc-type.md new file mode 100644 index 00000000..541b2c85 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/doc-type.md @@ -0,0 +1,7 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.issue.openid4vci](../../index.md)/[DeferredIssueResult](../index.md)/[DocumentFailed](index.md)/[docType](doc-type.md) + +# docType + +[androidJvm]\ +open override +val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/document-id.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/document-id.md index 31d60787..9472f1d7 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/document-id.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/document-id.md @@ -3,4 +3,4 @@ # documentId [androidJvm]\ -val [documentId](document-id.md): DocumentId +open override val [documentId](document-id.md): DocumentId diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/index.md index a36d6ee9..89cc1428 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/index.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/index.md @@ -4,19 +4,23 @@ [androidJvm]\ data class [DocumentFailed](index.md)(val documentId: DocumentId, val +name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val +docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val cause: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)) : [DeferredIssueResult](../index.md), [OpenId4VciResult.Erroneous](../../-open-id4-vci-result/-erroneous/index.md) Document issuance failed. ## Constructors -| | | -|---------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| -| [DocumentFailed](-document-failed.md) | [androidJvm]
constructor(documentId: DocumentId, cause: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)) | +| | | +|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [DocumentFailed](-document-failed.md) | [androidJvm]
constructor(documentId: DocumentId, name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), cause: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)) | ## Properties | Name | Summary | |------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [cause](cause.md) | [androidJvm]
open override val [cause](cause.md): [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)
the error that caused the failure | -| [documentId](document-id.md) | [androidJvm]
val [documentId](document-id.md): DocumentId | +| [docType](doc-type.md) | [androidJvm]
open override val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the document type | +| [documentId](document-id.md) | [androidJvm]
open override val [documentId](document-id.md): DocumentId
the id of the failed document | +| [name](name.md) | [androidJvm]
open override val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the name of the document | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/name.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/name.md new file mode 100644 index 00000000..e5530f51 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/name.md @@ -0,0 +1,6 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.issue.openid4vci](../../index.md)/[DeferredIssueResult](../index.md)/[DocumentFailed](index.md)/[name](name.md) + +# name + +[androidJvm]\ +open override val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/doc-type.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/doc-type.md index a13c7589..de49b34a 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/doc-type.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/doc-type.md @@ -3,4 +3,5 @@ # docType [androidJvm]\ +open override val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/document-id.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/document-id.md index dd0fee36..74ab1bad 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/document-id.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/document-id.md @@ -3,4 +3,4 @@ # documentId [androidJvm]\ -val [documentId](document-id.md): DocumentId +open override val [documentId](document-id.md): DocumentId diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/index.md index 087cc0a5..deefdfe5 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/index.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/index.md @@ -22,8 +22,8 @@ Document issued successfully. ## Properties -| Name | Summary | -|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| -| [docType](doc-type.md) | [androidJvm]
val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the document type | -| [documentId](document-id.md) | [androidJvm]
val [documentId](document-id.md): DocumentId
the id of the issued document | -| [name](name.md) | [androidJvm]
val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the name of the document | +| Name | Summary | +|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [docType](doc-type.md) | [androidJvm]
open override val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the document type | +| [documentId](document-id.md) | [androidJvm]
open override val [documentId](document-id.md): DocumentId
the id of the issued document | +| [name](name.md) | [androidJvm]
open override val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the name of the document | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/name.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/name.md index 359bb829..e09f10f7 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/name.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/name.md @@ -3,4 +3,4 @@ # name [androidJvm]\ -val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) +open override val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/doc-type.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/doc-type.md index 77ada789..2fa2e807 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/doc-type.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/doc-type.md @@ -3,4 +3,5 @@ # docType [androidJvm]\ +open override val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/document-id.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/document-id.md index 042f8e10..dec9904c 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/document-id.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/document-id.md @@ -3,4 +3,4 @@ # documentId [androidJvm]\ -val [documentId](document-id.md): DocumentId +open override val [documentId](document-id.md): DocumentId diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/index.md index fd326a49..9edeb8db 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/index.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/index.md @@ -17,8 +17,8 @@ Document issuance deferred. ## Properties -| Name | Summary | -|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| -| [docType](doc-type.md) | [androidJvm]
val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the document type | -| [documentId](document-id.md) | [androidJvm]
val [documentId](document-id.md): DocumentId
the id of the deferred document | -| [name](name.md) | [androidJvm]
val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the name of the document | +| Name | Summary | +|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [docType](doc-type.md) | [androidJvm]
open override val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the document type | +| [documentId](document-id.md) | [androidJvm]
open override val [documentId](document-id.md): DocumentId
the id of the deferred document | +| [name](name.md) | [androidJvm]
open override val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the name of the document | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/name.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/name.md index 42fdb883..d855e123 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/name.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/name.md @@ -3,4 +3,4 @@ # name [androidJvm]\ -val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) +open override val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/doc-type.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/doc-type.md new file mode 100644 index 00000000..84b81498 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/doc-type.md @@ -0,0 +1,6 @@ +//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.issue.openid4vci](../index.md)/[DeferredIssueResult](index.md)/[docType](doc-type.md) + +# docType + +[androidJvm]\ +abstract val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/document-id.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/document-id.md new file mode 100644 index 00000000..804f96eb --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/document-id.md @@ -0,0 +1,6 @@ +//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.issue.openid4vci](../index.md)/[DeferredIssueResult](index.md)/[documentId](document-id.md) + +# documentId + +[androidJvm]\ +abstract val [documentId](document-id.md): DocumentId diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/index.md index becfca6a..4ffc5f31 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/index.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/index.md @@ -4,6 +4,8 @@ interface [DeferredIssueResult](index.md) : [OpenId4VciResult](../-open-id4-vci-result/index.md) +Result of a deferred document issuance. + #### Inheritors | | @@ -11,11 +13,21 @@ interface [DeferredIssueResult](index.md) : [OpenId4VciResult](../-open-id4-vci- | [DocumentIssued](-document-issued/index.md) | | [DocumentFailed](-document-failed/index.md) | | [DocumentNotReady](-document-not-ready/index.md) | +| [DocumentExpired](-document-expired/index.md) | ## Types -| Name | Summary | -|--------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [DocumentFailed](-document-failed/index.md) | [androidJvm]
data class [DocumentFailed](-document-failed/index.md)(val documentId: DocumentId, val cause: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)) : [DeferredIssueResult](index.md), [OpenId4VciResult.Erroneous](../-open-id4-vci-result/-erroneous/index.md)
Document issuance failed. | -| [DocumentIssued](-document-issued/index.md) | [androidJvm]
data class [DocumentIssued](-document-issued/index.md)(val documentId: DocumentId, val name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) : [DeferredIssueResult](index.md)
Document issued successfully. | -| [DocumentNotReady](-document-not-ready/index.md) | [androidJvm]
data class [DocumentNotReady](-document-not-ready/index.md)(val documentId: DocumentId, val name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) : [DeferredIssueResult](index.md)
Document issuance deferred. | +| Name | Summary | +|--------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [DocumentExpired](-document-expired/index.md) | [androidJvm]
data class [DocumentExpired](-document-expired/index.md)(val documentId: DocumentId, val name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) : [DeferredIssueResult](index.md)
Document issuance expired. | +| [DocumentFailed](-document-failed/index.md) | [androidJvm]
data class [DocumentFailed](-document-failed/index.md)(val documentId: DocumentId, val name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val cause: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)) : [DeferredIssueResult](index.md), [OpenId4VciResult.Erroneous](../-open-id4-vci-result/-erroneous/index.md)
Document issuance failed. | +| [DocumentIssued](-document-issued/index.md) | [androidJvm]
data class [DocumentIssued](-document-issued/index.md)(val documentId: DocumentId, val name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) : [DeferredIssueResult](index.md)
Document issued successfully. | +| [DocumentNotReady](-document-not-ready/index.md) | [androidJvm]
data class [DocumentNotReady](-document-not-ready/index.md)(val documentId: DocumentId, val name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) : [DeferredIssueResult](index.md)
Document issuance deferred. | + +## Properties + +| Name | Summary | +|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [docType](doc-type.md) | [androidJvm]
abstract val [docType](doc-type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the document type | +| [documentId](document-id.md) | [androidJvm]
abstract val [documentId](document-id.md): DocumentId
the id of the document | +| [name](name.md) | [androidJvm]
abstract val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the name of the document | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/name.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/name.md new file mode 100644 index 00000000..08269fd5 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/name.md @@ -0,0 +1,6 @@ +//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.issue.openid4vci](../index.md)/[DeferredIssueResult](index.md)/[name](name.md) + +# name + +[androidJvm]\ +abstract val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md index f858456b..1b813ba4 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md @@ -27,11 +27,11 @@ documents using a document type or an offer, and to resolve an offer ## Functions -| Name | Summary | -|-----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [issueDeferredDocument](issue-deferred-document.md) | [androidJvm]
abstract fun [issueDeferredDocument](issue-deferred-document.md)(deferredDocument: DeferredDocument, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)?, onIssueResult: [OpenId4VciManager.OnDeferredIssueResult](-on-deferred-issue-result/index.md))
Issue a deferred document | -| [issueDocumentByDocType](issue-document-by-doc-type.md) | [androidJvm]
abstract fun [issueDocumentByDocType](issue-document-by-doc-type.md)(docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onIssueEvent: [OpenId4VciManager.OnIssueEvent](-on-issue-event/index.md))
Issue a document using a document type | -| [issueDocumentByOffer](issue-document-by-offer.md) | [androidJvm]
abstract fun [issueDocumentByOffer](issue-document-by-offer.md)(offer: [Offer](../-offer/index.md), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onIssueEvent: [OpenId4VciManager.OnIssueEvent](-on-issue-event/index.md))
Issue a document using an offer | -| [issueDocumentByOfferUri](issue-document-by-offer-uri.md) | [androidJvm]
abstract fun [issueDocumentByOfferUri](issue-document-by-offer-uri.md)(offerUri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onIssueEvent: [OpenId4VciManager.OnIssueEvent](-on-issue-event/index.md))
Issue a document using an offer URI | -| [resolveDocumentOffer](resolve-document-offer.md) | [androidJvm]
abstract fun [resolveDocumentOffer](resolve-document-offer.md)(offerUri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onResolvedOffer: [OpenId4VciManager.OnResolvedOffer](-on-resolved-offer/index.md))
Resolve an offer using OpenId4Vci protocol | -| [resumeWithAuthorization](resume-with-authorization.md) | [androidJvm]
abstract fun [resumeWithAuthorization](resume-with-authorization.md)(intent: [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html))
abstract fun [resumeWithAuthorization](resume-with-authorization.md)(uri: [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html))
abstract fun [resumeWithAuthorization](resume-with-authorization.md)(uri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html))
Resume the authorization flow after the user has been redirected back to the app | +| Name | Summary | +|-----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [issueDeferredDocument](issue-deferred-document.md) | [androidJvm]
abstract fun [issueDeferredDocument](issue-deferred-document.md)(deferredDocument: DeferredDocument, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)?, onIssueResult: [OpenId4VciManager.OnDeferredIssueResult](-on-deferred-issue-result/index.md))
Issue a deferred document | +| [issueDocumentByDocType](issue-document-by-doc-type.md) | [androidJvm]
abstract fun [issueDocumentByDocType](issue-document-by-doc-type.md)(docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onIssueEvent: [OpenId4VciManager.OnIssueEvent](-on-issue-event/index.md))
Issue a document using a document type | +| [issueDocumentByOffer](issue-document-by-offer.md) | [androidJvm]
abstract fun [issueDocumentByOffer](issue-document-by-offer.md)(offer: [Offer](../-offer/index.md), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onIssueEvent: [OpenId4VciManager.OnIssueEvent](-on-issue-event/index.md))
Issue a document using an offer | +| [issueDocumentByOfferUri](issue-document-by-offer-uri.md) | [androidJvm]
abstract fun [issueDocumentByOfferUri](issue-document-by-offer-uri.md)(offerUri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onIssueEvent: [OpenId4VciManager.OnIssueEvent](-on-issue-event/index.md))
Issue a document using an offer URI | +| [resolveDocumentOffer](resolve-document-offer.md) | [androidJvm]
abstract fun [resolveDocumentOffer](resolve-document-offer.md)(offerUri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onResolvedOffer: [OpenId4VciManager.OnResolvedOffer](-on-resolved-offer/index.md))
Resolve an offer using OpenId4Vci protocol | +| [resumeWithAuthorization](resume-with-authorization.md) | [androidJvm]
abstract fun [resumeWithAuthorization](resume-with-authorization.md)(uri: [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html))
abstract fun [resumeWithAuthorization](resume-with-authorization.md)(uri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html))
Resume the authorization flow after the user has been redirected back to the app | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/resume-with-authorization.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/resume-with-authorization.md index 3579213b..ee093b46 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/resume-with-authorization.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/resume-with-authorization.md @@ -2,26 +2,6 @@ # resumeWithAuthorization -[androidJvm]\ -abstract fun [resumeWithAuthorization](resume-with-authorization.md)( -intent: [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html)) - -Resume the authorization flow after the user has been redirected back to the app - -#### Parameters - -androidJvm - -| | | -|--------|-------------------------------------------------| -| intent | the intent that contains the authorization code | - -#### Throws - -| | | -|------------------------------------------------------------------------------------------------------------------|---------------------------------------| -| [IllegalStateException](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-state-exception/index.html) | if no authorization request to resume | - [androidJvm]\ abstract fun [resumeWithAuthorization](resume-with-authorization.md)( uri: [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html)) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/index.md index c9d1529f..85bcdaa2 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/index.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/index.md @@ -6,7 +6,7 @@ | Name | Summary | |-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [DeferredIssueResult](-deferred-issue-result/index.md) | [androidJvm]
interface [DeferredIssueResult](-deferred-issue-result/index.md) : [OpenId4VciResult](-open-id4-vci-result/index.md) | +| [DeferredIssueResult](-deferred-issue-result/index.md) | [androidJvm]
interface [DeferredIssueResult](-deferred-issue-result/index.md) : [OpenId4VciResult](-open-id4-vci-result/index.md)
Result of a deferred document issuance. | | [IssueEvent](-issue-event/index.md) | [androidJvm]
interface [IssueEvent](-issue-event/index.md) : [OpenId4VciResult](-open-id4-vci-result/index.md)
Events related to document issuance. | | [Offer](-offer/index.md) | [androidJvm]
interface [Offer](-offer/index.md)
An offer of credentials to be issued. | | [OfferResult](-offer-result/index.md) | [androidJvm]
interface [OfferResult](-offer-result/index.md) : [OpenId4VciResult](-open-id4-vci-result/index.md)
The result of an offer operation. | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/-logger-impl.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/-logger-impl.md deleted file mode 100644 index 6229eebe..00000000 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/-logger-impl.md +++ /dev/null @@ -1,7 +0,0 @@ -//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../index.md)/[LoggerImpl](index.md)/[LoggerImpl](-logger-impl.md) - -# LoggerImpl - -[androidJvm]\ -constructor(config: [EudiWalletConfig](../../eu.europa.ec.eudi.wallet/-eudi-wallet-config/index.md), -maxLogSize: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 1000) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/config.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/config.md deleted file mode 100644 index 369b4f88..00000000 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/config.md +++ /dev/null @@ -1,6 +0,0 @@ -//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../index.md)/[LoggerImpl](index.md)/[config](config.md) - -# config - -[androidJvm]\ -val [config](config.md): [EudiWalletConfig](../../eu.europa.ec.eudi.wallet/-eudi-wallet-config/index.md) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/index.md deleted file mode 100644 index f809d4a0..00000000 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/index.md +++ /dev/null @@ -1,31 +0,0 @@ -//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../index.md)/[LoggerImpl](index.md) - -# LoggerImpl - -[androidJvm]\ -class [LoggerImpl](index.md)(val -config: [EudiWalletConfig](../../eu.europa.ec.eudi.wallet/-eudi-wallet-config/index.md), -maxLogSize: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = -1000) : [Logger](../-logger/index.md) - -## Constructors - -| | | -|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [LoggerImpl](-logger-impl.md) | [androidJvm]
constructor(config: [EudiWalletConfig](../../eu.europa.ec.eudi.wallet/-eudi-wallet-config/index.md), maxLogSize: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 1000) | - -## Functions - -| Name | Summary | -|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [d](../-logger/d.md) | [androidJvm]
open fun [d](../-logger/d.md)(tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) | -| [e](../-logger/e.md) | [androidJvm]
open fun [e](../-logger/e.md)(tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), throwable: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)? = null) | -| [i](../-logger/i.md) | [androidJvm]
open fun [i](../-logger/i.md)(tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) | -| [log](log.md) | [androidJvm]
open override fun [log](log.md)(level: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), throwable: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)?) | - -## Properties - -| Name | Summary | -|---------------------|---------------------------------------------------------------------------------------------------------------------------------| -| [config](config.md) | [androidJvm]
val [config](config.md): [EudiWalletConfig](../../eu.europa.ec.eudi.wallet/-eudi-wallet-config/index.md) | -| [level](level.md) | [androidJvm]
open override val [level](level.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/level.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/level.md deleted file mode 100644 index d28551c3..00000000 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/level.md +++ /dev/null @@ -1,6 +0,0 @@ -//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../index.md)/[LoggerImpl](index.md)/[level](level.md) - -# level - -[androidJvm]\ -open override val [level](level.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/log.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/log.md deleted file mode 100644 index 352b130e..00000000 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/log.md +++ /dev/null @@ -1,9 +0,0 @@ -//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../index.md)/[LoggerImpl](index.md)/[log](log.md) - -# log - -[androidJvm]\ -open override fun [log](log.md)(level: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), -tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), -message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), -throwable: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)?) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/-record.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/-record.md new file mode 100644 index 00000000..a3a3da0c --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/-record.md @@ -0,0 +1,11 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../../index.md)/[Logger](../index.md)/[Record](index.md)/[Record](-record.md) + +# Record + +[androidJvm]\ +constructor(level: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), +instant: [Instant](https://developer.android.com/reference/kotlin/java/time/Instant.html) = Instant.now(), +message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), +thrown: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)? = null, +sourceClassName: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, +sourceMethod: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/index.md new file mode 100644 index 00000000..060b19a7 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/index.md @@ -0,0 +1,28 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../../index.md)/[Logger](../index.md)/[Record](index.md) + +# Record + +[androidJvm]\ +data class [Record](index.md)(val level: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), val +instant: [Instant](https://developer.android.com/reference/kotlin/java/time/Instant.html) = Instant.now(), val +message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val +thrown: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)? = null, val +sourceClassName: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, val +sourceMethod: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null) + +## Constructors + +| | | +|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Record](-record.md) | [androidJvm]
constructor(level: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), instant: [Instant](https://developer.android.com/reference/kotlin/java/time/Instant.html) = Instant.now(), message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), thrown: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)? = null, sourceClassName: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, sourceMethod: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null) | + +## Properties + +| Name | Summary | +|-----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------| +| [instant](instant.md) | [androidJvm]
val [instant](instant.md): [Instant](https://developer.android.com/reference/kotlin/java/time/Instant.html) | +| [level](level.md) | [androidJvm]
val [level](level.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | +| [message](message.md) | [androidJvm]
val [message](message.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | +| [sourceClassName](source-class-name.md) | [androidJvm]
val [sourceClassName](source-class-name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null | +| [sourceMethod](source-method.md) | [androidJvm]
val [sourceMethod](source-method.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null | +| [thrown](thrown.md) | [androidJvm]
val [thrown](thrown.md): [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)? = null | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/instant.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/instant.md new file mode 100644 index 00000000..8b8fb1e7 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/instant.md @@ -0,0 +1,6 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../../index.md)/[Logger](../index.md)/[Record](index.md)/[instant](instant.md) + +# instant + +[androidJvm]\ +val [instant](instant.md): [Instant](https://developer.android.com/reference/kotlin/java/time/Instant.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/level.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/level.md new file mode 100644 index 00000000..c821c368 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/level.md @@ -0,0 +1,6 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../../index.md)/[Logger](../index.md)/[Record](index.md)/[level](level.md) + +# level + +[androidJvm]\ +val [level](level.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/message.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/message.md new file mode 100644 index 00000000..8ffb5aa1 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/message.md @@ -0,0 +1,6 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../../index.md)/[Logger](../index.md)/[Record](index.md)/[message](message.md) + +# message + +[androidJvm]\ +val [message](message.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/source-class-name.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/source-class-name.md new file mode 100644 index 00000000..dff23d37 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/source-class-name.md @@ -0,0 +1,7 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../../index.md)/[Logger](../index.md)/[Record](index.md)/[sourceClassName](source-class-name.md) + +# sourceClassName + +[androidJvm]\ +val [sourceClassName](source-class-name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = +null diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/source-method.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/source-method.md new file mode 100644 index 00000000..3f240217 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/source-method.md @@ -0,0 +1,7 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../../index.md)/[Logger](../index.md)/[Record](index.md)/[sourceMethod](source-method.md) + +# sourceMethod + +[androidJvm]\ +val [sourceMethod](source-method.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = +null diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/thrown.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/thrown.md new file mode 100644 index 00000000..66debb36 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/thrown.md @@ -0,0 +1,6 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../../index.md)/[Logger](../index.md)/[Record](index.md)/[thrown](thrown.md) + +# thrown + +[androidJvm]\ +val [thrown](thrown.md): [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)? = null diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/d.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/d.md deleted file mode 100644 index a7152271..00000000 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/d.md +++ /dev/null @@ -1,7 +0,0 @@ -//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../index.md)/[Logger](index.md)/[d](d.md) - -# d - -[androidJvm]\ -open fun [d](d.md)(tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), -message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/e.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/e.md deleted file mode 100644 index bf3cf9de..00000000 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/e.md +++ /dev/null @@ -1,8 +0,0 @@ -//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../index.md)/[Logger](index.md)/[e](e.md) - -# e - -[androidJvm]\ -open fun [e](e.md)(tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), -message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), -throwable: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)? = null) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/i.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/i.md deleted file mode 100644 index 78ce23dc..00000000 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/i.md +++ /dev/null @@ -1,7 +0,0 @@ -//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../index.md)/[Logger](index.md)/[i](i.md) - -# i - -[androidJvm]\ -open fun [i](i.md)(tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), -message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/index.md index eb1de58d..6db4184f 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/index.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/index.md @@ -2,32 +2,19 @@ # Logger -interface [Logger](index.md) - -#### Inheritors - -| | -|----------------------------------------| -| [LoggerImpl](../-logger-impl/index.md) | +[androidJvm]\ +fun interface [Logger](index.md) ## Types -| Name | Summary | -|----------------------------------|--------------------------------------------------------------------------------------------------| -| [Companion](-companion/index.md) | [androidJvm]
object [Companion](-companion/index.md) | -| [Level](-level/index.md) | [androidJvm]
annotation class [Level](-level/index.md)
Log level for the OpenId4Vci issuer | +| Name | Summary | +|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Companion](-companion/index.md) | [androidJvm]
object [Companion](-companion/index.md) | +| [Level](-level/index.md) | [androidJvm]
annotation class [Level](-level/index.md)
Log level for the OpenId4Vci issuer | +| [Record](-record/index.md) | [androidJvm]
data class [Record](-record/index.md)(val level: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), val instant: [Instant](https://developer.android.com/reference/kotlin/java/time/Instant.html) = Instant.now(), val message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val thrown: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)? = null, val sourceClassName: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, val sourceMethod: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null) | ## Functions -| Name | Summary | -|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [d](d.md) | [androidJvm]
open fun [d](d.md)(tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) | -| [e](e.md) | [androidJvm]
open fun [e](e.md)(tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), throwable: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)? = null) | -| [i](i.md) | [androidJvm]
open fun [i](i.md)(tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) | -| [log](log.md) | [androidJvm]
abstract fun [log](log.md)(level: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), throwable: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)? = null) | - -## Properties - -| Name | Summary | -|-------------------|----------------------------------------------------------------------------------------------------------------------------| -| [level](level.md) | [androidJvm]
abstract val [level](level.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | +| Name | Summary | +|---------------|---------------------------------------------------------------------------------------| +| [log](log.md) | [androidJvm]
abstract fun [log](log.md)(record: [Logger.Record](-record/index.md)) | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/level.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/level.md deleted file mode 100644 index 5b67d28e..00000000 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/level.md +++ /dev/null @@ -1,6 +0,0 @@ -//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet.logging](../index.md)/[Logger](index.md)/[level](level.md) - -# level - -[androidJvm]\ -abstract val [level](level.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/log.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/log.md index 7cd6ef89..1e218c0a 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/log.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/log.md @@ -3,7 +3,4 @@ # log [androidJvm]\ -abstract fun [log](log.md)(level: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), -tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), -message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), -throwable: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)? = null) +abstract fun [log](log.md)(record: [Logger.Record](-record/index.md)) diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/index.md index 9fb3be9b..629e6901 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/index.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet.logging/index.md @@ -4,7 +4,6 @@ ## Types -| Name | Summary | -|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [Logger](-logger/index.md) | [androidJvm]
interface [Logger](-logger/index.md) | -| [LoggerImpl](-logger-impl/index.md) | [androidJvm]
class [LoggerImpl](-logger-impl/index.md)(val config: [EudiWalletConfig](../eu.europa.ec.eudi.wallet/-eudi-wallet-config/index.md), maxLogSize: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 1000) : [Logger](-logger/index.md) | +| Name | Summary | +|----------------------------|----------------------------------------------------------| +| [Logger](-logger/index.md) | [androidJvm]
fun interface [Logger](-logger/index.md) | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/index.md index f99c4440..7c08cfae 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/index.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/index.md @@ -30,6 +30,7 @@ androidJvm | [documentsStorageDir](documents-storage-dir.md) | [androidJvm]
fun [documentsStorageDir](documents-storage-dir.md)(documentStorageDir: [File](https://developer.android.com/reference/kotlin/java/io/File.html)): [EudiWalletConfig.Builder](index.md)
Documents storage dir. This is the directory where the documents will be stored. If not set, the default directory is the noBackupFilesDir. | | [encryptDocumentsInStorage](encrypt-documents-in-storage.md) | [androidJvm]
fun [encryptDocumentsInStorage](encrypt-documents-in-storage.md)(encryptDocumentsInStorage: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)): [EudiWalletConfig.Builder](index.md)
Encrypt documents in storage. If true, the documents will be encrypted in the storage. | | [ktorHttpClientFactory](ktor-http-client-factory.md) | [androidJvm]
fun [ktorHttpClientFactory](ktor-http-client-factory.md)(factory: () -> HttpClient): [EudiWalletConfig.Builder](index.md)
Set the Ktor HttpClient factory. This factory will be used to create the Ktor HttpClient. This HttpClient will be used by the [eu.europa.ec.eudi.wallet.transfer.openid4vp.OpenId4vpManager](../../../eu.europa.ec.eudi.wallet.transfer.openid4vp/-open-id4vp-manager/index.md) and [eu.europa.ec.eudi.wallet.issue.openid4vci.OpenId4VciManager](../../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md) | +| [logger](logger.md) | [androidJvm]
fun [logger](logger.md)(logger: [Logger](../../../eu.europa.ec.eudi.wallet.logging/-logger/index.md)): [EudiWalletConfig.Builder](index.md)
Set a logger | | [logLevel](log-level.md) | [androidJvm]
fun [logLevel](log-level.md)(level: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [EudiWalletConfig.Builder](index.md)
Set the debug logging level. The default value is LogLevel.OFF. | | [openId4VciConfig](open-id4-vci-config.md) | [androidJvm]
fun [openId4VciConfig](open-id4-vci-config.md)(openId4VciConfig: [OpenId4VciManager.Config](../../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-config/index.md)): [EudiWalletConfig.Builder](index.md)
fun [openId4VciConfig](open-id4-vci-config.md)(block: [OpenId4VciManager.Config.Builder](../../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-config/-builder/index.md).() -> [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)): [EudiWalletConfig.Builder](index.md)
OpenId4Vci config | | [openId4VpConfig](open-id4-vp-config.md) | [androidJvm]
fun [openId4VpConfig](open-id4-vp-config.md)(openId4VpConfig: [OpenId4VpConfig](../../../eu.europa.ec.eudi.wallet.transfer.openid4vp/-open-id4-vp-config/index.md)): [EudiWalletConfig.Builder](index.md)
fun [openId4VpConfig](open-id4-vp-config.md)(block: [OpenId4VpConfig.Builder](../../../eu.europa.ec.eudi.wallet.transfer.openid4vp/-open-id4-vp-config/-builder/index.md).() -> [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)): [EudiWalletConfig.Builder](index.md)
openId4VpConfig config | @@ -48,6 +49,7 @@ androidJvm | [documentsStorageDir](documents-storage-dir.md) | [androidJvm]
var [documentsStorageDir](documents-storage-dir.md): [File](https://developer.android.com/reference/kotlin/java/io/File.html)
This is the directory where the documents will be stored. If not set, the default directory is the noBackupFilesDir. | | [encryptDocumentsInStorage](encrypt-documents-in-storage.md) | [androidJvm]
var [encryptDocumentsInStorage](encrypt-documents-in-storage.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
If true, the documents will be encrypted in the storage. The default value is true. | | [ktorHttpClientFactory](ktor-http-client-factory.md) | [androidJvm]
var [ktorHttpClientFactory](ktor-http-client-factory.md): () -> HttpClient? | +| [logger](logger.md) | [androidJvm]
var [logger](logger.md): [Logger](../../../eu.europa.ec.eudi.wallet.logging/-logger/index.md)? | | [logLevel](log-level.md) | [androidJvm]
var [logLevel](log-level.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | | [openId4VciConfig](open-id4-vci-config.md) | [androidJvm]
var [openId4VciConfig](open-id4-vci-config.md): [OpenId4VciManager.Config](../../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-config/index.md)?
This is the config that will be used to issue using OpenId4Vci. If not set OpenId4Vci will not be available. | | [openId4VpConfig](open-id4-vp-config.md) | [androidJvm]
var [openId4VpConfig](open-id4-vp-config.md): [OpenId4VpConfig](../../../eu.europa.ec.eudi.wallet.transfer.openid4vp/-open-id4-vp-config/index.md)? | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/logger.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/logger.md new file mode 100644 index 00000000..2edb399b --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/logger.md @@ -0,0 +1,24 @@ +//[wallet-core](../../../../index.md)/[eu.europa.ec.eudi.wallet](../../index.md)/[EudiWalletConfig](../index.md)/[Builder](index.md)/[logger](logger.md) + +# logger + +[androidJvm]\ +fun [logger](logger.md)( +logger: [Logger](../../../eu.europa.ec.eudi.wallet.logging/-logger/index.md)): [EudiWalletConfig.Builder](index.md) + +Set a logger + +#### Return + +[EudiWalletConfig.Builder](index.md) + +#### Parameters + +androidJvm + +| | | +|--------|------------| +| logger | The logger | + +[androidJvm]\ +var [logger](logger.md): [Logger](../../../eu.europa.ec.eudi.wallet.logging/-logger/index.md)? diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/index.md index e588fede..744bf050 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/index.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/index.md @@ -28,6 +28,7 @@ This class is used to configure the Eudi wallet. Use the [Builder](-builder/inde | [documentsStorageDir](documents-storage-dir.md) | [androidJvm]
val [documentsStorageDir](documents-storage-dir.md): [File](https://developer.android.com/reference/kotlin/java/io/File.html)
Documents storage dir. This is the directory where the documents will be stored. If not set, the default directory is the noBackupFilesDir. | | [encryptDocumentsInStorage](encrypt-documents-in-storage.md) | [androidJvm]
val [encryptDocumentsInStorage](encrypt-documents-in-storage.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
Encrypt documents in storage If true, the documents will be encrypted in the storage. | | [ktorHttpClientFactory](ktor-http-client-factory.md) | [androidJvm]
val [ktorHttpClientFactory](ktor-http-client-factory.md): () -> HttpClient?
Ktor http client factory | +| [logger](logger.md) | [androidJvm]
val [logger](logger.md): [Logger](../../eu.europa.ec.eudi.wallet.logging/-logger/index.md)?
The logger. If no [Logger](../../eu.europa.ec.eudi.wallet.logging/-logger/index.md) instance is provided and [logLevel](log-level.md) is not [Logger.OFF](../../eu.europa.ec.eudi.wallet.logging/-logger/-companion/-o-f-f.md), then the default will be used | | [logLevel](log-level.md) | [androidJvm]
val [logLevel](log-level.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)
Debug logging level | | [openId4VciConfig](open-id4-vci-config.md) | [androidJvm]
val [openId4VciConfig](open-id4-vci-config.md): [OpenId4VciManager.Config](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-config/index.md)?
OpenId4Vci config This is the config that will be used to issue using OpenId4Vci. | | [openId4VPConfig](open-id4-v-p-config.md) | [androidJvm]
val [openId4VPConfig](open-id4-v-p-config.md): [OpenId4VpConfig](../../eu.europa.ec.eudi.wallet.transfer.openid4vp/-open-id4-vp-config/index.md)?
openId4VPConfig config This is the config that will be used for OpenId4Vp transfer. | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/logger.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/logger.md new file mode 100644 index 00000000..cba75e4a --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/logger.md @@ -0,0 +1,10 @@ +//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet](../index.md)/[EudiWalletConfig](index.md)/[logger](logger.md) + +# logger + +[androidJvm]\ +val [logger](logger.md): [Logger](../../eu.europa.ec.eudi.wallet.logging/-logger/index.md)? + +The logger. If no [Logger](../../eu.europa.ec.eudi.wallet.logging/-logger/index.md) instance is provided +and [logLevel](log-level.md) is not [Logger.OFF](../../eu.europa.ec.eudi.wallet.logging/-logger/-companion/-o-f-f.md), +then the default will be used diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/create-open-id4-vci-manager.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/create-open-id4-vci-manager.md new file mode 100644 index 00000000..89dcd057 --- /dev/null +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/create-open-id4-vci-manager.md @@ -0,0 +1,25 @@ +//[wallet-core](../../../index.md)/[eu.europa.ec.eudi.wallet](../index.md)/[EudiWallet](index.md)/[createOpenId4VciManager](create-open-id4-vci-manager.md) + +# createOpenId4VciManager + +[androidJvm]\ +fun [createOpenId4VciManager](create-open-id4-vci-manager.md)(): [OpenId4VciManager](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md) + +Creates and returns +an [OpenId4VciManager](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md) instance + +#### Return + +[OpenId4VciManager](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md) + +#### See also + +| | +|-----------------------------------------------------------------------------------------------------| +| [OpenId4VciManager](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md) | + +#### Throws + +| | | +|------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [IllegalStateException](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-state-exception/index.html) | if [EudiWallet](index.md) is not firstly initialized via the [init](init.md) method or if the [EudiWalletConfig.openId4VciConfig](../-eudi-wallet-config/open-id4-vci-config.md) is not set | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/index.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/index.md index e934f138..9aacb1e8 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/index.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/index.md @@ -31,35 +31,36 @@ EudiWallet.init(context, config) ## Functions -| Name | Summary | -|--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [addTransferEventListener](add-transfer-event-listener.md) | [androidJvm]
fun [addTransferEventListener](add-transfer-event-listener.md)(listener: TransferEvent.Listener): [EudiWallet](index.md)
Adds a transfer event listener in order to be notified about transfer events | -| [createDocument](create-document.md) | [androidJvm]
fun [createDocument](create-document.md)(docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), hardwareBacked: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html), attestationChallenge: [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)? = null): CreateDocumentResult
Create an UnsignedDocument for the given [docType](create-document.md) | -| [deleteDocumentById](delete-document-by-id.md) | [androidJvm]
fun [deleteDocumentById](delete-document-by-id.md)(documentId: DocumentId): DeleteDocumentResult
Delete the document with the given [documentId](delete-document-by-id.md) | -| [disableNFCEngagement](disable-n-f-c-engagement.md) | [androidJvm]
fun [disableNFCEngagement](disable-n-f-c-engagement.md)(activity: [ComponentActivity](https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity.html))
Disables the NFC engagement functionality | -| [enableNFCEngagement](enable-n-f-c-engagement.md) | [androidJvm]
fun [enableNFCEngagement](enable-n-f-c-engagement.md)(activity: [ComponentActivity](https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity.html))
Enables the NFC engagement functionality You must also add [DefaultNfcEngagementService](../../eu.europa.ec.eudi.wallet.util/-default-nfc-engagement-service/index.md) to your application's manifest file | -| [getAllDocuments](get-all-documents.md) | [androidJvm]
fun [getAllDocuments](get-all-documents.md)(): [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)<Document>
Returns the list of all documents | -| [getDocumentById](get-document-by-id.md) | [androidJvm]
fun [getDocumentById](get-document-by-id.md)(documentId: DocumentId): Document?
Returns the document with the given [documentId](get-document-by-id.md) | -| [getDocuments](get-documents.md) | [androidJvm]
fun [getDocuments](get-documents.md)(): [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)<IssuedDocument>
Returns the list of IssuedDocument | -| [init](init.md) | [androidJvm]
fun [init](init.md)(context: [Context](https://developer.android.com/reference/kotlin/android/content/Context.html), config: [EudiWalletConfig](../-eudi-wallet-config/index.md))
Initialize the sdk with the given [config](init.md) | -| [issueDeferredDocument](issue-deferred-document.md) | [androidJvm]
fun [issueDeferredDocument](issue-deferred-document.md)(documentId: DocumentId, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onResult: [OpenId4VciManager.OnDeferredIssueResult](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-deferred-issue-result/index.md))
Issue a deferred document using the OpenId4VCI protocol | -| [issueDocumentByDocType](issue-document-by-doc-type.md) | [androidJvm]
fun [issueDocumentByDocType](issue-document-by-doc-type.md)(docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onEvent: [OpenId4VciManager.OnIssueEvent](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-issue-event/index.md))
Issue a document using the OpenId4VCI protocol | -| [issueDocumentByOffer](issue-document-by-offer.md) | [androidJvm]
fun [issueDocumentByOffer](issue-document-by-offer.md)(offer: [Offer](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-offer/index.md), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onEvent: [OpenId4VciManager.OnIssueEvent](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-issue-event/index.md))
Issue a document using an offer and the OpenId4VCI protocol | -| [issueDocumentByOfferUri](issue-document-by-offer-uri.md) | [androidJvm]
fun [issueDocumentByOfferUri](issue-document-by-offer-uri.md)(offerUri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onEvent: [OpenId4VciManager.OnIssueEvent](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-issue-event/index.md))
Issue a document using an offerUri and the OpenId4VCI protocol | -| [loadSampleData](load-sample-data.md) | [androidJvm]
fun [loadSampleData](load-sample-data.md)(sampleData: [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)): LoadSampleResult
Loads sample data into the wallet's document manager | -| [removeAllTransferEventListeners](remove-all-transfer-event-listeners.md) | [androidJvm]
fun [removeAllTransferEventListeners](remove-all-transfer-event-listeners.md)(): [EudiWallet](index.md)
Removes all transfer event listeners. | -| [removeTransferEventListener](remove-transfer-event-listener.md) | [androidJvm]
fun [removeTransferEventListener](remove-transfer-event-listener.md)(listener: TransferEvent.Listener): [EudiWallet](index.md)
Removes a transfer event listener. | -| [resolveDocumentOffer](resolve-document-offer.md) | [androidJvm]
fun [resolveDocumentOffer](resolve-document-offer.md)(offerUri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onResult: [OpenId4VciManager.OnResolvedOffer](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-resolved-offer/index.md))
Resolves a document offer using OpenId4VCI protocol | -| [resolveRequestUri](resolve-request-uri.md) | [androidJvm]
fun [resolveRequestUri](resolve-request-uri.md)(openid4VpURI: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html))
Start engagement for OpenId4Vp | -| [resumeOpenId4VciWithAuthorization](resume-open-id4-vci-with-authorization.md) | [androidJvm]
fun [resumeOpenId4VciWithAuthorization](resume-open-id4-vci-with-authorization.md)(intent: [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html))
Resumes the OpenId4VCI flow with the given [intent](resume-open-id4-vci-with-authorization.md)
[androidJvm]
fun [resumeOpenId4VciWithAuthorization](resume-open-id4-vci-with-authorization.md)(uri: [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html))
fun [resumeOpenId4VciWithAuthorization](resume-open-id4-vci-with-authorization.md)(uri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html))
Resumes the OpenId4VCI flow with the given intent | -| [sendResponse](send-response.md) | [androidJvm]
fun [sendResponse](send-response.md)(disclosedDocuments: DisclosedDocuments): ResponseResult
Send a response by giving DisclosedDocuments, i.e. the list of documents to be disclosed. The method returns a `ResponseResult` object, which can be one of the following: | -| [setReaderTrustStore](set-reader-trust-store.md) | [androidJvm]
fun [setReaderTrustStore](set-reader-trust-store.md)(readerTrustStore: ReaderTrustStore): [EudiWallet](index.md)
Sets the reader trust store with the readers' certificates that are trusted by the wallet | -| [setTrustedReaderCertificates](set-trusted-reader-certificates.md) | [androidJvm]
fun [setTrustedReaderCertificates](set-trusted-reader-certificates.md)(@[RawRes](https://developer.android.com/reference/kotlin/androidx/annotation/RawRes.html)vararg rawRes: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [EudiWallet](index.md)
Sets the readers' certificates from raw resources that are trusted by the wallet
[androidJvm]
fun [setTrustedReaderCertificates](set-trusted-reader-certificates.md)(trustedReaderCertificates: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)<[X509Certificate](https://developer.android.com/reference/kotlin/java/security/cert/X509Certificate.html)>): [EudiWallet](index.md)
Sets the readers' certificates that are trusted by the wallet | -| [startEngagementFromIntent](start-engagement-from-intent.md) | [androidJvm]
fun [startEngagementFromIntent](start-engagement-from-intent.md)(intent: [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html))
Start engagement from an Intent. This will perform engagement for REST API or OpenId4Vp depending on the scheme. | -| [startEngagementToApp](start-engagement-to-app.md) | [androidJvm]
fun [startEngagementToApp](start-engagement-to-app.md)(intent: [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html))
Start engagement for REST API | -| [startQrEngagement](start-qr-engagement.md) | [androidJvm]
fun [startQrEngagement](start-qr-engagement.md)()
Starts the transfer process by engaging with the reader via QR code | -| [stopPresentation](stop-presentation.md) | [androidJvm]
fun [stopPresentation](stop-presentation.md)(sendSessionTerminationMessage: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = true, useTransportSpecificSessionTermination: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false)
Stops the transfer process | -| [storeIssuedDocument](store-issued-document.md) | [androidJvm]
fun [storeIssuedDocument](store-issued-document.md)(unsignedDocument: UnsignedDocument, data: [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)): StoreDocumentResult
Add a document to the wallet | +| Name | Summary | +|--------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [addTransferEventListener](add-transfer-event-listener.md) | [androidJvm]
fun [addTransferEventListener](add-transfer-event-listener.md)(listener: TransferEvent.Listener): [EudiWallet](index.md)
Adds a transfer event listener in order to be notified about transfer events | +| [createDocument](create-document.md) | [androidJvm]
fun [createDocument](create-document.md)(docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), hardwareBacked: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html), attestationChallenge: [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)? = null): CreateDocumentResult
Create an UnsignedDocument for the given [docType](create-document.md) | +| [createOpenId4VciManager](create-open-id4-vci-manager.md) | [androidJvm]
fun [createOpenId4VciManager](create-open-id4-vci-manager.md)(): [OpenId4VciManager](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md)
Creates and returns an [OpenId4VciManager](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md) instance | +| [deleteDocumentById](delete-document-by-id.md) | [androidJvm]
fun [deleteDocumentById](delete-document-by-id.md)(documentId: DocumentId): DeleteDocumentResult
Delete the document with the given [documentId](delete-document-by-id.md) | +| [disableNFCEngagement](disable-n-f-c-engagement.md) | [androidJvm]
fun [disableNFCEngagement](disable-n-f-c-engagement.md)(activity: [ComponentActivity](https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity.html))
Disables the NFC engagement functionality | +| [enableNFCEngagement](enable-n-f-c-engagement.md) | [androidJvm]
fun [enableNFCEngagement](enable-n-f-c-engagement.md)(activity: [ComponentActivity](https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity.html))
Enables the NFC engagement functionality You must also add [DefaultNfcEngagementService](../../eu.europa.ec.eudi.wallet.util/-default-nfc-engagement-service/index.md) to your application's manifest file | +| [getAllDocuments](get-all-documents.md) | [androidJvm]
fun [getAllDocuments](get-all-documents.md)(): [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)<Document>
Returns the list of all documents | +| [getDocumentById](get-document-by-id.md) | [androidJvm]
fun [getDocumentById](get-document-by-id.md)(documentId: DocumentId): Document?
Returns the document with the given [documentId](get-document-by-id.md) | +| [getDocuments](get-documents.md) | [androidJvm]
fun [getDocuments](get-documents.md)(): [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)<IssuedDocument>
Returns the list of IssuedDocument | +| [init](init.md) | [androidJvm]
fun [init](init.md)(context: [Context](https://developer.android.com/reference/kotlin/android/content/Context.html), config: [EudiWalletConfig](../-eudi-wallet-config/index.md))
Initialize the sdk with the given [config](init.md) | +| [issueDeferredDocument](issue-deferred-document.md) | [androidJvm]
fun [~~issueDeferredDocument~~](issue-deferred-document.md)(documentId: DocumentId, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onResult: [OpenId4VciManager.OnDeferredIssueResult](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-deferred-issue-result/index.md))
Issue a deferred document using the OpenId4VCI protocol | +| [issueDocumentByDocType](issue-document-by-doc-type.md) | [androidJvm]
fun [~~issueDocumentByDocType~~](issue-document-by-doc-type.md)(docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onEvent: [OpenId4VciManager.OnIssueEvent](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-issue-event/index.md))
Issue a document using the OpenId4VCI protocol | +| [issueDocumentByOffer](issue-document-by-offer.md) | [androidJvm]
fun [~~issueDocumentByOffer~~](issue-document-by-offer.md)(offer: [Offer](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-offer/index.md), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onEvent: [OpenId4VciManager.OnIssueEvent](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-issue-event/index.md))
Issue a document using an offer and the OpenId4VCI protocol | +| [issueDocumentByOfferUri](issue-document-by-offer-uri.md) | [androidJvm]
fun [~~issueDocumentByOfferUri~~](issue-document-by-offer-uri.md)(offerUri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onEvent: [OpenId4VciManager.OnIssueEvent](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-issue-event/index.md))
Issue a document using an offerUri and the OpenId4VCI protocol | +| [loadSampleData](load-sample-data.md) | [androidJvm]
fun [loadSampleData](load-sample-data.md)(sampleData: [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)): LoadSampleResult
Loads sample data into the wallet's document manager | +| [removeAllTransferEventListeners](remove-all-transfer-event-listeners.md) | [androidJvm]
fun [removeAllTransferEventListeners](remove-all-transfer-event-listeners.md)(): [EudiWallet](index.md)
Removes all transfer event listeners. | +| [removeTransferEventListener](remove-transfer-event-listener.md) | [androidJvm]
fun [removeTransferEventListener](remove-transfer-event-listener.md)(listener: TransferEvent.Listener): [EudiWallet](index.md)
Removes a transfer event listener. | +| [resolveDocumentOffer](resolve-document-offer.md) | [androidJvm]
fun [~~resolveDocumentOffer~~](resolve-document-offer.md)(offerUri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onResult: [OpenId4VciManager.OnResolvedOffer](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-resolved-offer/index.md))
Resolves a document offer using OpenId4VCI protocol | +| [resolveRequestUri](resolve-request-uri.md) | [androidJvm]
fun [resolveRequestUri](resolve-request-uri.md)(openid4VpURI: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html))
Start engagement for OpenId4Vp | +| [resumeOpenId4VciWithAuthorization](resume-open-id4-vci-with-authorization.md) | [androidJvm]
fun [~~resumeOpenId4VciWithAuthorization~~](resume-open-id4-vci-with-authorization.md)(intent: [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html))
Resumes the OpenId4VCI flow with the given [intent](resume-open-id4-vci-with-authorization.md). Intent's data uri must contain the authorization code and the server state parameters to resume with the authorization
[androidJvm]
fun [~~resumeOpenId4VciWithAuthorization~~](resume-open-id4-vci-with-authorization.md)(uri: [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html))
fun [~~resumeOpenId4VciWithAuthorization~~](resume-open-id4-vci-with-authorization.md)(uri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html))
Resumes the OpenId4VCI flow with the given [uri](resume-open-id4-vci-with-authorization.md). [uri](resume-open-id4-vci-with-authorization.md) must contain the authorization code and the server state parameters to resume with the authorization | +| [sendResponse](send-response.md) | [androidJvm]
fun [sendResponse](send-response.md)(disclosedDocuments: DisclosedDocuments): ResponseResult
Send a response by giving DisclosedDocuments, i.e. the list of documents to be disclosed. The method returns a `ResponseResult` object, which can be one of the following: | +| [setReaderTrustStore](set-reader-trust-store.md) | [androidJvm]
fun [setReaderTrustStore](set-reader-trust-store.md)(readerTrustStore: ReaderTrustStore): [EudiWallet](index.md)
Sets the reader trust store with the readers' certificates that are trusted by the wallet | +| [setTrustedReaderCertificates](set-trusted-reader-certificates.md) | [androidJvm]
fun [setTrustedReaderCertificates](set-trusted-reader-certificates.md)(@[RawRes](https://developer.android.com/reference/kotlin/androidx/annotation/RawRes.html)vararg rawRes: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [EudiWallet](index.md)
Sets the readers' certificates from raw resources that are trusted by the wallet
[androidJvm]
fun [setTrustedReaderCertificates](set-trusted-reader-certificates.md)(trustedReaderCertificates: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)<[X509Certificate](https://developer.android.com/reference/kotlin/java/security/cert/X509Certificate.html)>): [EudiWallet](index.md)
Sets the readers' certificates that are trusted by the wallet | +| [startEngagementFromIntent](start-engagement-from-intent.md) | [androidJvm]
fun [startEngagementFromIntent](start-engagement-from-intent.md)(intent: [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html))
Start engagement from an Intent. This will perform engagement for REST API or OpenId4Vp depending on the scheme. | +| [startEngagementToApp](start-engagement-to-app.md) | [androidJvm]
fun [startEngagementToApp](start-engagement-to-app.md)(intent: [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html))
Start engagement for REST API | +| [startQrEngagement](start-qr-engagement.md) | [androidJvm]
fun [startQrEngagement](start-qr-engagement.md)()
Starts the transfer process by engaging with the reader via QR code | +| [stopPresentation](stop-presentation.md) | [androidJvm]
fun [stopPresentation](stop-presentation.md)(sendSessionTerminationMessage: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = true, useTransportSpecificSessionTermination: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false)
Stops the transfer process | +| [storeIssuedDocument](store-issued-document.md) | [androidJvm]
fun [storeIssuedDocument](store-issued-document.md)(unsignedDocument: UnsignedDocument, data: [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)): StoreDocumentResult
Add a document to the wallet | ## Properties diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-deferred-document.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-deferred-document.md index b610911f..4b781bf1 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-deferred-document.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-deferred-document.md @@ -3,10 +3,19 @@ # issueDeferredDocument [androidJvm]\ -fun [issueDeferredDocument](issue-deferred-document.md)(documentId: DocumentId, +fun [~~issueDeferredDocument~~](issue-deferred-document.md)(documentId: DocumentId, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onResult: [OpenId4VciManager.OnDeferredIssueResult](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-deferred-issue-result/index.md)) +--- + +### Deprecated + +Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the +OpendId4VciManager.issueDeferredDocument() instead + +--- + Issue a deferred document using the OpenId4VCI protocol #### Parameters diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-doc-type.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-doc-type.md index 1a8ebdc2..f121e9b4 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-doc-type.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-doc-type.md @@ -3,12 +3,21 @@ # issueDocumentByDocType [androidJvm]\ -fun [issueDocumentByDocType](issue-document-by-doc-type.md)( +fun [~~issueDocumentByDocType~~](issue-document-by-doc-type.md)( docType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onEvent: [OpenId4VciManager.OnIssueEvent](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-issue-event/index.md)) +--- + +### Deprecated + +Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the +OpendId4VciManager.issueDocumentByDocType() instead + +--- + Issue a document using the OpenId4VCI protocol #### Parameters @@ -32,6 +41,6 @@ androidJvm #### Throws -| | | -|---|---| +| | | +|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------| | [IllegalStateException](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-state-exception/index.html) | if [EudiWalletConfig.openId4VciConfig](../-eudi-wallet-config/open-id4-vci-config.md) is not set | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-offer-uri.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-offer-uri.md index 4c3bd262..946ffdeb 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-offer-uri.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-offer-uri.md @@ -3,12 +3,21 @@ # issueDocumentByOfferUri [androidJvm]\ -fun [issueDocumentByOfferUri](issue-document-by-offer-uri.md)( +fun [~~issueDocumentByOfferUri~~](issue-document-by-offer-uri.md)( offerUri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onEvent: [OpenId4VciManager.OnIssueEvent](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-issue-event/index.md)) +--- + +### Deprecated + +Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the +OpendId4VciManager.issueDocumentByOfferUri() instead + +--- + Issue a document using an offerUri and the OpenId4VCI protocol #### Parameters @@ -32,6 +41,6 @@ androidJvm #### Throws -| | | -|---|---| +| | | +|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------| | [IllegalStateException](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-state-exception/index.html) | if [EudiWalletConfig.openId4VciConfig](../-eudi-wallet-config/open-id4-vci-config.md) is not set | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-offer.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-offer.md index 99c2b277..8965e3f1 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-offer.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/issue-document-by-offer.md @@ -3,14 +3,27 @@ # issueDocumentByOffer [androidJvm]\ -fun [issueDocumentByOffer](issue-document-by-offer.md)( +fun [~~issueDocumentByOffer~~](issue-document-by-offer.md)( offer: [Offer](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-offer/index.md), txCode: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onEvent: [OpenId4VciManager.OnIssueEvent](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-issue-event/index.md)) +--- + +### Deprecated + +Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the +OpendId4VciManager.issueDocumentByOffer() instead + +--- + Issue a document using an offer and the OpenId4VCI protocol +#### Return + +[OpenId4VciManager](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md) + #### Parameters androidJvm @@ -28,10 +41,11 @@ androidJvm |--------------------------------------------------------------------------------------------------------------------------------------------| | [OpenId4VciManager.issueDocumentByOffer](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/issue-document-by-offer.md) | | [OpenId4VciManager.OnIssueEvent](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-issue-event/index.md) | on how to handle the result | -| [IssueEvent.DocumentRequiresUserAuth](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-issue-event/-document-requires-user-auth/index.md) | on how to handle user authentication | +| [IssueEvent.DocumentRequiresUserAuth](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-issue-event/-document-requires-user-auth/index.md) | on how to handle user authentication Creates and returns an [OpenId4VciManager](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md) instance | +| [OpenId4VciManager](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/index.md) | #### Throws -| | | -|---|---| -| [IllegalStateException](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-state-exception/index.html) | if [EudiWalletConfig.openId4VciConfig](../-eudi-wallet-config/open-id4-vci-config.md) is not set | +| | | +|------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [IllegalStateException](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-state-exception/index.html) | if [EudiWallet](index.md) is not firstly initialized via the [init](init.md) method or if the [EudiWalletConfig.openId4VciConfig](../-eudi-wallet-config/open-id4-vci-config.md) is not set | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/resolve-document-offer.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/resolve-document-offer.md index 0559c10e..8388a996 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/resolve-document-offer.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/resolve-document-offer.md @@ -3,7 +3,19 @@ # resolveDocumentOffer [androidJvm]\ -fun [resolveDocumentOffer](resolve-document-offer.md)(offerUri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, onResult: [OpenId4VciManager.OnResolvedOffer](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-resolved-offer/index.md)) +fun [~~resolveDocumentOffer~~](resolve-document-offer.md)( +offerUri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), +executor: [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html)? = null, +onResult: [OpenId4VciManager.OnResolvedOffer](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-resolved-offer/index.md)) + +--- + +### Deprecated + +Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the +OpendId4VciManager.resolveDocumentOffer() instead + +--- Resolves a document offer using OpenId4VCI protocol @@ -11,20 +23,20 @@ Resolves a document offer using OpenId4VCI protocol androidJvm -| | | -|---|---| -| offerUri | the offer uri | +| | | +|----------|-------------------------------------------------------------------------------------------------------------------------------| +| offerUri | the offer uri | | executor | the executor defines the thread on which the callback will be called. If null, the callback will be called on the main thread | -| onResult | the callback to be called when the offer is resolved | +| onResult | the callback to be called when the offer is resolved | #### See also -| | | -|---|---| +| | | +|----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------| | [OpenId4VciManager.OnResolvedOffer](../../eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/-on-resolved-offer/index.md) | on how to handle the result | #### Throws -| | | -|---|---| +| | | +|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------| | [IllegalStateException](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-state-exception/index.html) | if [EudiWalletConfig.openId4VciConfig](../-eudi-wallet-config/open-id4-vci-config.md) is not set | diff --git a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/resume-open-id4-vci-with-authorization.md b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/resume-open-id4-vci-with-authorization.md index 27aa7d1e..ec2e1196 100644 --- a/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/resume-open-id4-vci-with-authorization.md +++ b/docs/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/resume-open-id4-vci-with-authorization.md @@ -3,41 +3,65 @@ # resumeOpenId4VciWithAuthorization [androidJvm]\ -fun [resumeOpenId4VciWithAuthorization](resume-open-id4-vci-with-authorization.md)(intent: [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html)) +fun [~~resumeOpenId4VciWithAuthorization~~](resume-open-id4-vci-with-authorization.md)( +intent: [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html)) -Resumes the OpenId4VCI flow with the given [intent](resume-open-id4-vci-with-authorization.md) +--- + +### Deprecated + +Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the +OpendId4VciManager.resumeWithAuthorization() instead + +--- + +Resumes the OpenId4VCI flow with the given [intent](resume-open-id4-vci-with-authorization.md). Intent's data uri must +contain the authorization code and the server state parameters to resume with the authorization #### Parameters androidJvm -| | | -|---|---| +| | | +|--------|-------------------------------------------------| | intent | the intent that contains the authorization code | #### Throws -| | | -|---|---| +| | | +|------------------------------------------------------------------------------------------------------------------|---------------------------------------| | [IllegalStateException](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-state-exception/index.html) | if no authorization request to resume | [androidJvm]\ -fun [resumeOpenId4VciWithAuthorization](resume-open-id4-vci-with-authorization.md)(uri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) +fun [~~resumeOpenId4VciWithAuthorization~~](resume-open-id4-vci-with-authorization.md)( +uri: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) + +fun [~~resumeOpenId4VciWithAuthorization~~](resume-open-id4-vci-with-authorization.md)( +uri: [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html)) + +--- + +### Deprecated + +Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the +OpendId4VciManager.resumeWithAuthorization() instead -fun [resumeOpenId4VciWithAuthorization](resume-open-id4-vci-with-authorization.md)(uri: [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html)) +--- -Resumes the OpenId4VCI flow with the given intent +Resumes the OpenId4VCI flow with the +given [uri](resume-open-id4-vci-with-authorization.md). [uri](resume-open-id4-vci-with-authorization.md) must contain +the authorization code and the server state parameters to resume with the authorization #### Parameters androidJvm -| | | -|---|---| +| | | +|-----|----------------------------------------------| | uri | the uri that contains the authorization code | #### Throws -| | | -|---|---| +| | | +|------------------------------------------------------------------------------------------------------------------|---------------------------------------| | [IllegalStateException](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-state-exception/index.html) | if no authorization request to resume | diff --git a/docs/wallet-core/package-list b/docs/wallet-core/package-list index 1c314bad..ef953007 100644 --- a/docs/wallet-core/package-list +++ b/docs/wallet-core/package-list @@ -7,10 +7,17 @@ $dokka.location:eu.europa.ec.eudi.wallet.document/Constants/EU_PID_NAMESPACE/#/P $dokka.location:eu.europa.ec.eudi.wallet.document/Constants/MDL_DOCTYPE/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.document/-constants/-m-d-l_-d-o-c-t-y-p-e.md $dokka.location:eu.europa.ec.eudi.wallet.document/Constants/MDL_NAMESPACE/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.document/-constants/-m-d-l_-n-a-m-e-s-p-a-c-e.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci////PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/index.md +$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentExpired///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/index.md +$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentExpired/DocumentExpired/#kotlin.String#kotlin.String#kotlin.String/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/-document-expired.md +$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentExpired/docType/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/doc-type.md +$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentExpired/documentId/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/document-id.md +$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentExpired/name/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-expired/name.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentFailed///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/index.md -$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentFailed/DocumentFailed/#kotlin.String#kotlin.Throwable/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/-document-failed.md +$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentFailed/DocumentFailed/#kotlin.String#kotlin.String#kotlin.String#kotlin.Throwable/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/-document-failed.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentFailed/cause/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/cause.md +$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentFailed/docType/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/doc-type.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentFailed/documentId/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/document-id.md +$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentFailed/name/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-failed/name.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentIssued///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/index.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentIssued/DocumentIssued/#kotlin.String#kotlin.String#kotlin.String/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/-document-issued.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentIssued/docType/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-issued/doc-type.md @@ -22,6 +29,9 @@ $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.Do $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentNotReady/documentId/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/document-id.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult.DocumentNotReady/name/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/-document-not-ready/name.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/index.md +$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult/docType/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/doc-type.md +$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult/documentId/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/document-id.md +$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/DeferredIssueResult/name/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-deferred-issue-result/name.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/IssueEvent.Companion///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-issue-event/-companion/index.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/IssueEvent.DocumentDeferred///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-issue-event/-document-deferred/index.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/IssueEvent.DocumentDeferred/DocumentDeferred/#kotlin.String#kotlin.String#kotlin.String/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-issue-event/-document-deferred/-document-deferred.md @@ -146,7 +156,6 @@ $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/OpenId4VciManager/issu $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/OpenId4VciManager/issueDocumentByOffer/#eu.europa.ec.eudi.wallet.issue.openid4vci.Offer#kotlin.String?#java.util.concurrent.Executor?#eu.europa.ec.eudi.wallet.issue.openid4vci.OpenId4VciManager.OnIssueEvent/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/issue-document-by-offer.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/OpenId4VciManager/issueDocumentByOfferUri/#kotlin.String#kotlin.String?#java.util.concurrent.Executor?#eu.europa.ec.eudi.wallet.issue.openid4vci.OpenId4VciManager.OnIssueEvent/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/issue-document-by-offer-uri.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/OpenId4VciManager/resolveDocumentOffer/#kotlin.String#java.util.concurrent.Executor?#eu.europa.ec.eudi.wallet.issue.openid4vci.OpenId4VciManager.OnResolvedOffer/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/resolve-document-offer.md -$dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/OpenId4VciManager/resumeWithAuthorization/#android.content.Intent/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/resume-with-authorization.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/OpenId4VciManager/resumeWithAuthorization/#android.net.Uri/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/resume-with-authorization.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/OpenId4VciManager/resumeWithAuthorization/#kotlin.String/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-manager/resume-with-authorization.md $dokka.location:eu.europa.ec.eudi.wallet.issue.openid4vci/OpenId4VciResult.Erroneous///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.issue.openid4vci/-open-id4-vci-result/-erroneous/index.md @@ -161,17 +170,16 @@ $dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Companion/LEVEL_INFO/#/P $dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Companion/OFF/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-companion/-o-f-f.md $dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Companion/invoke/#eu.europa.ec.eudi.wallet.EudiWalletConfig/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-companion/invoke.md $dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Level///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-level/index.md +$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Record///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/index.md +$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Record/Record/#kotlin.Int#java.time.Instant#kotlin.String#kotlin.Throwable?#kotlin.String?#kotlin.String?/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/-record.md +$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Record/instant/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/instant.md +$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Record/level/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/level.md +$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Record/message/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/message.md +$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Record/sourceClassName/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/source-class-name.md +$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Record/sourceMethod/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/source-method.md +$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger.Record/thrown/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/-record/thrown.md $dokka.location:eu.europa.ec.eudi.wallet.logging/Logger///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/index.md -$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger/d/#kotlin.String#kotlin.String/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/d.md -$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger/e/#kotlin.String#kotlin.String#kotlin.Throwable?/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/e.md -$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger/i/#kotlin.String#kotlin.String/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/i.md -$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger/level/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/level.md -$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger/log/#kotlin.Int#kotlin.String#kotlin.String#kotlin.Throwable?/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/log.md -$dokka.location:eu.europa.ec.eudi.wallet.logging/LoggerImpl///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/index.md -$dokka.location:eu.europa.ec.eudi.wallet.logging/LoggerImpl/LoggerImpl/#eu.europa.ec.eudi.wallet.EudiWalletConfig#kotlin.Int/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/-logger-impl.md -$dokka.location:eu.europa.ec.eudi.wallet.logging/LoggerImpl/config/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/config.md -$dokka.location:eu.europa.ec.eudi.wallet.logging/LoggerImpl/level/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/level.md -$dokka.location:eu.europa.ec.eudi.wallet.logging/LoggerImpl/log/#kotlin.Int#kotlin.String#kotlin.String#kotlin.Throwable?/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger-impl/log.md +$dokka.location:eu.europa.ec.eudi.wallet.logging/Logger/log/#eu.europa.ec.eudi.wallet.logging.Logger.Record/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.logging/-logger/log.md $dokka.location:eu.europa.ec.eudi.wallet.transfer.openid4vp////PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.transfer.openid4vp/index.md $dokka.location:eu.europa.ec.eudi.wallet.transfer.openid4vp/ClientIdScheme.Preregistered///PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.transfer.openid4vp/-client-id-scheme/-preregistered/index.md $dokka.location:eu.europa.ec.eudi.wallet.transfer.openid4vp/ClientIdScheme.Preregistered/Preregistered/#kotlin.collections.List[eu.europa.ec.eudi.wallet.transfer.openid4vp.PreregisteredVerifier]/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet.transfer.openid4vp/-client-id-scheme/-preregistered/-preregistered.md @@ -282,6 +290,7 @@ $dokka.location:eu.europa.ec.eudi.wallet/EudiWallet///PointingToDeclaration/wal $dokka.location:eu.europa.ec.eudi.wallet/EudiWallet/addTransferEventListener/#eu.europa.ec.eudi.iso18013.transfer.TransferEvent.Listener/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/add-transfer-event-listener.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWallet/config/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/config.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWallet/createDocument/#kotlin.String#kotlin.Boolean#kotlin.ByteArray?/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/create-document.md +$dokka.location:eu.europa.ec.eudi.wallet/EudiWallet/createOpenId4VciManager/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/create-open-id4-vci-manager.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWallet/deleteDocumentById/#kotlin.String/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/delete-document-by-id.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWallet/disableNFCEngagement/#androidx.activity.ComponentActivity/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/disable-n-f-c-engagement.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWallet/documentManager/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet/document-manager.md @@ -327,6 +336,8 @@ $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig.Builder/ktorHttpClient $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig.Builder/ktorHttpClientFactory/#kotlin.Function0[io.ktor.client.HttpClient]/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/ktor-http-client-factory.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig.Builder/logLevel/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/log-level.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig.Builder/logLevel/#kotlin.Int/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/log-level.md +$dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig.Builder/logger/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/logger.md +$dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig.Builder/logger/#eu.europa.ec.eudi.wallet.logging.Logger/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/logger.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig.Builder/openId4VciConfig/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/open-id4-vci-config.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig.Builder/openId4VciConfig/#eu.europa.ec.eudi.wallet.issue.openid4vci.OpenId4VciManager.Config/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/open-id4-vci-config.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig.Builder/openId4VciConfig/#kotlin.Function1[eu.europa.ec.eudi.wallet.issue.openid4vci.OpenId4VciManager.Config.Builder,kotlin.Unit]/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/-builder/open-id4-vci-config.md @@ -358,6 +369,7 @@ $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig/documentsStorageDir/#/ $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig/encryptDocumentsInStorage/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/encrypt-documents-in-storage.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig/ktorHttpClientFactory/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/ktor-http-client-factory.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig/logLevel/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/log-level.md +$dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig/logger/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/logger.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig/openId4VPConfig/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/open-id4-v-p-config.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig/openId4VciConfig/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/open-id4-vci-config.md $dokka.location:eu.europa.ec.eudi.wallet/EudiWalletConfig/trustedReaderCertificates/#/PointingToDeclaration/wallet-core/eu.europa.ec.eudi.wallet/-eudi-wallet-config/trusted-reader-certificates.md diff --git a/gradle.properties b/gradle.properties index d9d9b746..a657ace8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.10.3-SNAPSHOT +VERSION_NAME=0.11.0-SNAPSHOT SONATYPE_HOST=S01 SONATYPE_AUTOMATIC_RELEASE=false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 72e150f7..75390ab2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ dependency-license-report = "2.8" dependencycheck = "9.0.9" espresso-contrib = "3.5.1" espresso-core = "3.5.1" -eudi-document-manager = "0.4.1" +eudi-document-manager = "0.4.2" eudi-iso18013-data-transfer = "0.2.0" eudi-lib-jvm-openid4vci-kt = "0.3.2" eudi-lib-jvm-siop-openid4vp-kt = "0.4.2" diff --git a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/EudiWallet.kt b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/EudiWallet.kt index 2619eb4d..88a35e4e 100644 --- a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/EudiWallet.kt +++ b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/EudiWallet.kt @@ -227,7 +227,29 @@ object EudiWallet { fun storeIssuedDocument(unsignedDocument: UnsignedDocument, data: ByteArray): StoreDocumentResult = documentManager.storeIssuedDocument(unsignedDocument, data) - private var openId4VciManager: OpenId4VciManager? = null + /** + * Creates and returns an [OpenId4VciManager] instance + * + * @throws IllegalStateException if [EudiWallet] is not firstly initialized via the [init] method or if the [EudiWalletConfig.openId4VciConfig] is not set + * @see [OpenId4VciManager] + * @return [OpenId4VciManager] + */ + fun createOpenId4VciManager(): OpenId4VciManager { + return requireInit { + config.openId4VciConfig?.let { config -> + OpenId4VciManager(context) { + documentManager(this@EudiWallet.documentManager) + config(config) + logger = this@EudiWallet.logger + ktorHttpClientFactory = _config.ktorHttpClientFactory + } + } ?: throw IllegalStateException("OpenId4Vci config is not set in configuration") + } + } + + private val openId4VciManager: OpenId4VciManager by lazy { + createOpenId4VciManager() + } /** * Issue a document using the OpenId4VCI protocol @@ -241,24 +263,18 @@ object EudiWallet { * @see [OpenId4VciManager.OnIssueEvent] on how to handle the result * @see [IssueEvent.DocumentRequiresUserAuth] on how to handle user authentication */ + @Deprecated("Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the OpendId4VciManager.issueDocumentByDocType() instead") fun issueDocumentByDocType( docType: String, txCode: String? = null, executor: Executor? = null, onEvent: OpenId4VciManager.OnIssueEvent, ) { - requireInit { - config.openId4VciConfig?.let { config -> - openId4VciManager = OpenId4VciManager(context) { - documentManager(this@EudiWallet.documentManager) - config(config) - logger = this@EudiWallet.logger - ktorHttpClientFactory = _config.ktorHttpClientFactory - }.also { it.issueDocumentByDocType(docType, txCode, executor, onEvent) } - } ?: run { - (executor ?: context.mainExecutor()).execute { - onEvent(IssueEvent.failure(IllegalStateException("OpenId4Vci config is not set in configuration"))) - } + try { + openId4VciManager.issueDocumentByDocType(docType, txCode, executor, onEvent) + } catch (e: Throwable) { + (executor ?: context.mainExecutor()).execute { + onEvent(IssueEvent.failure(e)) } } } @@ -275,25 +291,24 @@ object EudiWallet { * @see [OpenId4VciManager.issueDocumentByOffer] * @see [OpenId4VciManager.OnIssueEvent] on how to handle the result * @see [IssueEvent.DocumentRequiresUserAuth] on how to handle user authentication + * Creates and returns an [OpenId4VciManager] instance + * + * @throws IllegalStateException if [EudiWallet] is not firstly initialized via the [init] method or if the [EudiWalletConfig.openId4VciConfig] is not set + * @see [OpenId4VciManager] + * @return [OpenId4VciManager] */ + @Deprecated("Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the OpendId4VciManager.issueDocumentByOffer() instead") fun issueDocumentByOffer( offer: Offer, txCode: String? = null, executor: Executor? = null, onEvent: OpenId4VciManager.OnIssueEvent, ) { - requireInit { - config.openId4VciConfig?.let { config -> - openId4VciManager = OpenId4VciManager(context) { - documentManager(this@EudiWallet.documentManager) - config(config) - logger = this@EudiWallet.logger - ktorHttpClientFactory = _config.ktorHttpClientFactory - }.also { it.issueDocumentByOffer(offer, txCode, executor, onEvent) } - } ?: run { - (executor ?: context.mainExecutor()).execute { - onEvent(IssueEvent.failure(IllegalStateException("OpenId4Vci config is not set in configuration"))) - } + try { + openId4VciManager.issueDocumentByOffer(offer, txCode, executor, onEvent) + } catch (e: Throwable) { + (executor ?: context.mainExecutor()).execute { + onEvent(IssueEvent.failure(e)) } } } @@ -310,24 +325,18 @@ object EudiWallet { * @see [OpenId4VciManager.OnIssueEvent] on how to handle the result * @see [IssueEvent.DocumentRequiresUserAuth] on how to handle user authentication */ + @Deprecated("Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the OpendId4VciManager.issueDocumentByOfferUri() instead") fun issueDocumentByOfferUri( offerUri: String, txCode: String? = null, executor: Executor? = null, onEvent: OpenId4VciManager.OnIssueEvent, ) { - requireInit { - config.openId4VciConfig?.let { config -> - openId4VciManager = OpenId4VciManager(context) { - documentManager(this@EudiWallet.documentManager) - config(config) - logger = this@EudiWallet.logger - ktorHttpClientFactory = _config.ktorHttpClientFactory - }.also { it.issueDocumentByOfferUri(offerUri, txCode, executor, onEvent) } - } ?: run { - (executor ?: context.mainExecutor()).execute { - onEvent(IssueEvent.failure(IllegalStateException("OpenId4Vci config is not set in configuration"))) - } + try { + openId4VciManager.issueDocumentByOfferUri(offerUri, txCode, executor, onEvent) + } catch (e: Throwable) { + (executor ?: context.mainExecutor()).execute { + onEvent(IssueEvent.failure(e)) } } } @@ -341,46 +350,37 @@ object EudiWallet { * @see [OpenId4VciManager.issueDeferredDocument] * @see [OpenId4VciManager.OnDeferredIssueResult] on how to handle the result */ + @Deprecated("Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the OpendId4VciManager.issueDeferredDocument() instead") fun issueDeferredDocument( documentId: DocumentId, executor: Executor? = null, onResult: OpenId4VciManager.OnDeferredIssueResult, ) { - requireInit { - config.openId4VciConfig?.let { config -> - openId4VciManager = OpenId4VciManager(context) { - documentManager(this@EudiWallet.documentManager) - config(config) - logger = this@EudiWallet.logger - ktorHttpClientFactory = _config.ktorHttpClientFactory - }.also { - when (val document = documentManager.getDocumentById(documentId)) { - is DeferredDocument -> it.issueDeferredDocument(document, executor, onResult) - else -> (executor ?: context.mainExecutor()).execute { - onResult( - DeferredIssueResult.DocumentFailed( - documentId = documentId, - name = document?.name ?: "", - docType = document?.docType ?: "", - cause = IllegalStateException("Document is not deferred") - ) - ) - } - } - - } - } ?: run { - (executor ?: context.mainExecutor()).execute { + try { + when (val document = documentManager.getDocumentById(documentId)) { + is DeferredDocument -> openId4VciManager.issueDeferredDocument(document, executor, onResult) + else -> (executor ?: context.mainExecutor()).execute { onResult( DeferredIssueResult.DocumentFailed( documentId = documentId, - name = "", - docType = "", - cause = IllegalStateException("OpenId4Vci config is not set in configuration") + name = document?.name ?: "", + docType = document?.docType ?: "", + cause = IllegalStateException("Document is not deferred") ) ) } } + } catch (e: Throwable) { + (executor ?: context.mainExecutor()).execute { + onResult( + DeferredIssueResult.DocumentFailed( + documentId = documentId, + name = "", + docType = "", + cause = e + ) + ) + } } } @@ -394,57 +394,60 @@ object EudiWallet { * @throws IllegalStateException if [EudiWallet] is not firstly initialized via the [init] method * @throws IllegalStateException if [EudiWalletConfig.openId4VciConfig] is not set */ + @Deprecated("Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the OpendId4VciManager.resolveDocumentOffer() instead") fun resolveDocumentOffer( offerUri: String, executor: Executor? = null, onResult: OpenId4VciManager.OnResolvedOffer, ) { - requireInit { - config.openId4VciConfig?.let { config -> - openId4VciManager = OpenId4VciManager(context) { - documentManager(this@EudiWallet.documentManager) - config(config) - logger = this@EudiWallet.logger - ktorHttpClientFactory = _config.ktorHttpClientFactory - }.also { it.resolveDocumentOffer(offerUri, executor, onResult) } - } ?: run { - (executor ?: context.mainExecutor()).execute { - onResult(OfferResult.Failure(IllegalStateException("OpenId4Vci config is not set in configuration"))) - } + try { + openId4VciManager.resolveDocumentOffer(offerUri, executor, onResult) + } catch (e: Throwable) { + (executor ?: context.mainExecutor()).execute { + onResult(OfferResult.Failure(e)) } } } /** - * Resumes the OpenId4VCI flow with the given [intent] + * Resumes the OpenId4VCI flow with the given [intent]. + * Intent's data uri must contain the authorization code and the server state parameters + * to resume with the authorization * @param intent the intent that contains the authorization code * @throws [IllegalStateException] if no authorization request to resume */ + @Deprecated("Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the OpendId4VciManager.resumeWithAuthorization() instead") fun resumeOpenId4VciWithAuthorization(intent: Intent) { - openId4VciManager?.resumeWithAuthorization(intent) - ?: throw IllegalStateException("No OpenId4VciManager to resume") + intent.data?.let { uri -> + openId4VciManager.resumeWithAuthorization(uri) + } ?: throw IllegalStateException("Intent does not contain data") } /** - * Resumes the OpenId4VCI flow with the given [intent] + * Resumes the OpenId4VCI flow with the given [uri]. + * [uri] must contain the authorization code and the server state parameters + * to resume with the authorization * @param uri the uri that contains the authorization code * @throws [IllegalStateException] if no authorization request to resume */ + @Deprecated("Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the OpendId4VciManager.resumeWithAuthorization() instead") fun resumeOpenId4VciWithAuthorization(uri: String) { - openId4VciManager?.resumeWithAuthorization(uri) - ?: throw IllegalStateException("No OpenId4VciManager to resume") + openId4VciManager.resumeWithAuthorization(uri) } /** - * Resumes the OpenId4VCI flow with the given [intent] + * Resumes the OpenId4VCI flow with the given [uri]. + * [uri] must contain the authorization code and the server state parameters + * to resume with the authorization * @param uri the uri that contains the authorization code * @throws [IllegalStateException] if no authorization request to resume */ + @Deprecated("Use EudiWallet.createOpenId4VciManager() to create an instance of OpenId4VciManager and use the OpendId4VciManager.resumeWithAuthorization() instead") fun resumeOpenId4VciWithAuthorization(uri: Uri) { - openId4VciManager?.resumeWithAuthorization(uri) - ?: throw IllegalStateException("No OpenId4VciManager to resume") + openId4VciManager.resumeWithAuthorization(uri) } + /** * Loads sample data into the wallet's document manager * @param sampleData the sample data diff --git a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/issue/openid4vci/DefaultOpenId4VciManager.kt b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/issue/openid4vci/DefaultOpenId4VciManager.kt index 2fa12765..0ffb0fb0 100644 --- a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/issue/openid4vci/DefaultOpenId4VciManager.kt +++ b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/issue/openid4vci/DefaultOpenId4VciManager.kt @@ -17,7 +17,6 @@ package eu.europa.ec.eudi.wallet.issue.openid4vci import android.content.Context -import android.content.Intent import android.net.Uri import eu.europa.ec.eudi.openid4vci.DefaultHttpClientFactory import eu.europa.ec.eudi.openid4vci.DeferredIssuer @@ -182,27 +181,10 @@ internal class DefaultOpenId4VciManager( } } - override fun resumeWithAuthorization(intent: Intent) = intent.data?.let { uri -> - resumeWithAuthorization(uri) - } ?: throw IllegalStateException("No uri to resume from Intent") - - override fun resumeWithAuthorization(uri: String) = resumeWithAuthorization(Uri.parse(uri)) - override fun resumeWithAuthorization(uri: Uri) = issuerAuthorization.resumeFromUri(uri) - - /** - * Launches a coroutine. - * @param onResult The result listener. - * @param block The coroutine block. - */ - private inline fun launch( - executor: Executor?, - onResult: OpenId4VciManager.OnResult, - crossinline block: suspend (coroutineScope: CoroutineScope, onResult: OpenId4VciManager.OnResult) -> Unit, - ) { - val scope = CoroutineScope(Dispatchers.IO) - scope.launch { block(scope, onResult.runOn(executor ?: context.mainExecutor()).wrapWithLogging(logger)) } + override fun resumeWithAuthorization(uri: String) { + resumeWithAuthorization(Uri.parse(uri)) } /** @@ -236,4 +218,24 @@ internal class DefaultOpenId4VciManager( ).use { it.process(response) } listener(IssueEvent.Finished(issuedDocumentIds)) } + + /** + * Launches a coroutine. + * @param onResult The result listener. + * @param block The coroutine block. + */ + private inline fun launch( + executor: Executor?, + onResult: OpenId4VciManager.OnResult, + crossinline block: suspend (coroutineScope: CoroutineScope, onResult: OpenId4VciManager.OnResult) -> Unit, + ) { + val scope = CoroutineScope(Dispatchers.IO) + scope.launch { + block( + scope, onResult + .runOn(executor ?: context.mainExecutor()) + .wrapWithLogging(logger) + ) + } + } } diff --git a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/issue/openid4vci/OpenId4VciManager.kt b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/issue/openid4vci/OpenId4VciManager.kt index 573bcd38..60f66928 100644 --- a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/issue/openid4vci/OpenId4VciManager.kt +++ b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/issue/openid4vci/OpenId4VciManager.kt @@ -17,7 +17,6 @@ package eu.europa.ec.eudi.wallet.issue.openid4vci import android.content.Context -import android.content.Intent import android.net.Uri import androidx.annotation.IntDef import eu.europa.ec.eudi.wallet.document.DeferredDocument @@ -106,13 +105,6 @@ interface OpenId4VciManager { */ fun resolveDocumentOffer(offerUri: String, executor: Executor? = null, onResolvedOffer: OnResolvedOffer) - /** - * Resume the authorization flow after the user has been redirected back to the app - * @param intent the intent that contains the authorization code - * @throws [IllegalStateException] if no authorization request to resume - * - */ - fun resumeWithAuthorization(intent: Intent) /** * Resume the authorization flow after the user has been redirected back to the app diff --git a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/logging/Extensions.kt b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/logging/Extensions.kt new file mode 100644 index 00000000..74b1a35a --- /dev/null +++ b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/logging/Extensions.kt @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2024 European Commission + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package eu.europa.ec.eudi.wallet.logging + +import eu.europa.ec.eudi.wallet.logging.Logger.Companion.LEVEL_DEBUG +import eu.europa.ec.eudi.wallet.logging.Logger.Companion.LEVEL_ERROR +import eu.europa.ec.eudi.wallet.logging.Logger.Companion.LEVEL_INFO + +@JvmSynthetic +internal fun Logger.d(tag: String, message: String) = log( + Logger.Record( + level = LEVEL_DEBUG, + sourceClassName = tag, + message = message + ) +) + +@JvmSynthetic +internal fun Logger.i(tag: String, message: String) = log( + Logger.Record( + level = LEVEL_INFO, + sourceClassName = tag, + message = message + ) +) + +@JvmSynthetic +internal fun Logger.e(tag: String, message: String, throwable: Throwable? = null) = + log( + Logger.Record( + level = LEVEL_ERROR, + sourceClassName = tag, + message = message, + thrown = throwable + ) + ) \ No newline at end of file diff --git a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/logging/Logger.kt b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/logging/Logger.kt index c1faf5b5..07a43916 100644 --- a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/logging/Logger.kt +++ b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/logging/Logger.kt @@ -16,12 +16,8 @@ package eu.europa.ec.eudi.wallet.logging -import android.util.Log import androidx.annotation.IntDef import eu.europa.ec.eudi.wallet.EudiWalletConfig -import eu.europa.ec.eudi.wallet.logging.Logger.Companion.LEVEL_DEBUG -import eu.europa.ec.eudi.wallet.logging.Logger.Companion.LEVEL_ERROR -import eu.europa.ec.eudi.wallet.logging.Logger.Companion.LEVEL_INFO import java.time.Instant @@ -54,57 +50,4 @@ fun interface Logger { annotation class Level } -class LoggerImpl(val config: EudiWalletConfig, private val maxLogSize: Int = 1000) : Logger { - override fun log(record: Logger.Record) { - val tag = record.sourceClassName ?: "" - splitMessage(record.message).forEachIndexed { i, m -> - when { - record.level == LEVEL_ERROR && config.logLevel >= LEVEL_ERROR && i == 0 && record.thrown != null -> - Log.e(tag, m, record.thrown) - - record.level == LEVEL_ERROR && config.logLevel >= LEVEL_ERROR -> Log.e(tag, m) - record.level == LEVEL_INFO && config.logLevel >= LEVEL_INFO -> Log.i(tag, m) - record.level == LEVEL_DEBUG && config.logLevel >= LEVEL_DEBUG -> Log.d(tag, m) - } - } - } - - private fun splitMessage(message: String): List { - val messages = mutableListOf() - for (i in 0..message.length step maxLogSize) { - val end = if (i + maxLogSize < message.length) i + maxLogSize else message.length - messages.add(message.substring(i, end)) - } - return messages - } -} - -@JvmSynthetic -internal fun Logger.d(tag: String, message: String) = log( - Logger.Record( - level = LEVEL_DEBUG, - sourceClassName = tag, - message = message - ) -) - -@JvmSynthetic -internal fun Logger.i(tag: String, message: String) = log( - Logger.Record( - level = LEVEL_INFO, - sourceClassName = tag, - message = message - ) -) - -@JvmSynthetic -internal fun Logger.e(tag: String, message: String, throwable: Throwable? = null) = - log( - Logger.Record( - level = LEVEL_ERROR, - sourceClassName = tag, - message = message, - thrown = throwable - ) - ) diff --git a/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/logging/LoggerImpl.kt b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/logging/LoggerImpl.kt new file mode 100644 index 00000000..b7e39465 --- /dev/null +++ b/wallet-core/src/main/java/eu/europa/ec/eudi/wallet/logging/LoggerImpl.kt @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2024 European Commission + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package eu.europa.ec.eudi.wallet.logging + +import android.util.Log +import eu.europa.ec.eudi.wallet.EudiWalletConfig + +internal class LoggerImpl(val config: EudiWalletConfig, private val maxLogSize: Int = 1000) : Logger { + override fun log(record: Logger.Record) { + val tag = record.sourceClassName ?: "" + splitMessage(record.message).forEachIndexed { i, m -> + when { + record.level == Logger.LEVEL_ERROR && config.logLevel >= Logger.LEVEL_ERROR && i == 0 && record.thrown != null -> + Log.e(tag, m, record.thrown) + + record.level == Logger.LEVEL_ERROR && config.logLevel >= Logger.LEVEL_ERROR -> Log.e(tag, m) + record.level == Logger.LEVEL_INFO && config.logLevel >= Logger.LEVEL_INFO -> Log.i(tag, m) + record.level == Logger.LEVEL_DEBUG && config.logLevel >= Logger.LEVEL_DEBUG -> Log.d(tag, m) + } + } + } + + private fun splitMessage(message: String): List { + val messages = mutableListOf() + for (i in 0..message.length step maxLogSize) { + val end = if (i + maxLogSize < message.length) i + maxLogSize else message.length + messages.add(message.substring(i, end)) + } + return messages + } +} \ No newline at end of file