Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Removed ClientIdScheme.Preregistered configuration due verifier name extraction from san_dns #187

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import eu.europa.ec.eudi.wallet.issue.openid4vci.OpenId4VciManager
import eu.europa.ec.eudi.wallet.transfer.openid4vp.ClientIdScheme
import eu.europa.ec.eudi.wallet.transfer.openid4vp.EncryptionAlgorithm
import eu.europa.ec.eudi.wallet.transfer.openid4vp.EncryptionMethod
import eu.europa.ec.eudi.wallet.transfer.openid4vp.PreregisteredVerifier
import eu.europa.ec.resourceslogic.R

internal class WalletCoreConfigImpl(
Expand All @@ -33,9 +32,6 @@ internal class WalletCoreConfigImpl(
) : WalletCoreConfig {

private companion object {
const val OPENID4VP_VERIFIER_API_URI = "https://verifier.eudiw.dev"
const val OPENID4VP_VERIFIER_LEGAL_NAME = "EUDI Remote Verifier"
const val OPENID4VP_VERIFIER_CLIENT_ID = "Verifier"
const val VCI_ISSUER_URL = "https://issuer.eudiw.dev"
const val VCI_CLIENT_ID = "wallet-dev"
const val AUTHENTICATION_REQUIRED = false
Expand All @@ -60,16 +56,7 @@ internal class WalletCoreConfigImpl(

withClientIdSchemes(
listOf(
ClientIdScheme.X509SanDns,
ClientIdScheme.Preregistered(
listOf(
PreregisteredVerifier(
clientId = OPENID4VP_VERIFIER_CLIENT_ID,
verifierApi = OPENID4VP_VERIFIER_API_URI,
legalName = OPENID4VP_VERIFIER_LEGAL_NAME
)
)
)
ClientIdScheme.X509SanDns
)
)
withScheme(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import eu.europa.ec.eudi.wallet.issue.openid4vci.OpenId4VciManager
import eu.europa.ec.eudi.wallet.transfer.openid4vp.ClientIdScheme
import eu.europa.ec.eudi.wallet.transfer.openid4vp.EncryptionAlgorithm
import eu.europa.ec.eudi.wallet.transfer.openid4vp.EncryptionMethod
import eu.europa.ec.eudi.wallet.transfer.openid4vp.PreregisteredVerifier
import eu.europa.ec.resourceslogic.R

internal class WalletCoreConfigImpl(
Expand All @@ -33,9 +32,6 @@ internal class WalletCoreConfigImpl(
) : WalletCoreConfig {

private companion object {
const val OPENID4VP_VERIFIER_API_URI = "https://dev.verifier.eudiw.dev"
const val OPENID4VP_VERIFIER_LEGAL_NAME = "EUDI Remote Verifier"
const val OPENID4VP_VERIFIER_CLIENT_ID = "Verifier"
const val VCI_ISSUER_URL = "https://dev.issuer.eudiw.dev"
const val VCI_CLIENT_ID = "wallet-dev"
const val AUTHENTICATION_REQUIRED = false
Expand All @@ -60,16 +56,7 @@ internal class WalletCoreConfigImpl(

withClientIdSchemes(
listOf(
ClientIdScheme.X509SanDns,
ClientIdScheme.Preregistered(
listOf(
PreregisteredVerifier(
clientId = OPENID4VP_VERIFIER_CLIENT_ID,
verifierApi = OPENID4VP_VERIFIER_API_URI,
legalName = OPENID4VP_VERIFIER_LEGAL_NAME
)
)
)
ClientIdScheme.X509SanDns
)
)
withScheme(
Expand Down
27 changes: 24 additions & 3 deletions wiki/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,36 @@ You can configure the *EudiWalletConfig* per flavor. You can find both implement

```
private companion object {
const val OPENID4VP_VERIFIER_API_URI = "https://verifier.eudiw.dev"
const val OPENID4VP_VERIFIER_LEGAL_NAME = "EUDI Remote Verifier"
const val OPENID4VP_VERIFIER_CLIENT_ID = "Verifier"
const val VCI_ISSUER_URL = "https://issuer.eudiw.dev/oidc"
const val VCI_CLIENT_ID = "wallet-demo"
const val AUTHENTICATION_REQUIRED = false
}
```

If you plan to use the *ClientIdScheme.Preregistered* for OpenId4VP configuration, please add the following to the configuration files.

```
const val OPENID4VP_VERIFIER_API_URI = "your_verifier_url"
const val OPENID4VP_VERIFIER_LEGAL_NAME = "your_verifier_legal_name"
const val OPENID4VP_VERIFIER_CLIENT_ID = "your_verifier_client_id"

.openId4VpConfig {
withClientIdSchemes(
listOf(
ClientIdScheme.Preregistered(
listOf(
PreregisteredVerifier(
clientId = OPENID4VP_VERIFIER_CLIENT_ID,
verifierApi = OPENID4VP_VERIFIER_API_URI,
legalName = OPENID4VP_VERIFIER_LEGAL_NAME
)
)
)
)
)
}
```

3. Trusted certificates

Via the *WalletCoreConfig* interface.
Expand Down
12 changes: 0 additions & 12 deletions wiki/how_to_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ depending on the flavor of your choice).
These are the contents of the ConfigWalletCoreImpl file (dev flavor) and you don't need to change anything:
```
private companion object {
const val OPENID4VP_VERIFIER_API_URI = "https://dev.verifier.eudiw.dev"
const val OPENID4VP_VERIFIER_LEGAL_NAME = "EUDI Remote Verifier"
const val OPENID4VP_VERIFIER_CLIENT_ID = "Verifier"
const val VCI_ISSUER_URL = "https://dev.issuer.eudiw.dev"
const val VCI_CLIENT_ID = "wallet-dev"
const val AUTHENTICATION_REQUIRED = false
Expand All @@ -60,9 +57,6 @@ After this, and assuming you are now running everything locally,
you need to change the contents of the ConfigWalletCoreImpl file, from:
```
private companion object {
const val OPENID4VP_VERIFIER_API_URI = "https://dev.verifier.eudiw.dev"
const val OPENID4VP_VERIFIER_LEGAL_NAME = "EUDI Remote Verifier"
const val OPENID4VP_VERIFIER_CLIENT_ID = "Verifier"
const val VCI_ISSUER_URL = "https://dev.issuer.eudiw.dev"
const val VCI_CLIENT_ID = "wallet-dev"
const val AUTHENTICATION_REQUIRED = false
Expand All @@ -71,9 +65,6 @@ private companion object {
into something like this:
```
private companion object {
const val OPENID4VP_VERIFIER_API_URI = "local_IP_address_of_verifier_endpoint"
const val OPENID4VP_VERIFIER_LEGAL_NAME = "EUDI Remote Verifier"
const val OPENID4VP_VERIFIER_CLIENT_ID = "Verifier"
const val VCI_ISSUER_URL = "local_IP_address_of_issuer"
const val VCI_CLIENT_ID = "wallet-dev"
const val AUTHENTICATION_REQUIRED = false
Expand All @@ -83,9 +74,6 @@ private companion object {
for example:
```
private companion object {
const val OPENID4VP_VERIFIER_API_URI = "http://192.168.1.1:8080"
const val OPENID4VP_VERIFIER_LEGAL_NAME = "EUDI Remote Verifier"
const val OPENID4VP_VERIFIER_CLIENT_ID = "Verifier"
const val VCI_ISSUER_URL = "https://192.168.1.1:5000"
const val VCI_CLIENT_ID = "wallet-dev"
const val AUTHENTICATION_REQUIRED = false
Expand Down
Loading