Skip to content

Commit

Permalink
Merge pull request #68 from niscy-eudiw/feature/configurable-par
Browse files Browse the repository at this point in the history
Feature/configurable par
  • Loading branch information
dtsiflit authored Jul 19, 2024
2 parents 9fe7a42 + f8b5c01 commit c7fa372
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 5 additions & 2 deletions Sources/Entities/Wallet/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ public struct OpenId4VCIConfig {
public let clientId: ClientId
public let authFlowRedirectionURI: URL
public let authorizeIssuanceConfig: AuthorizeIssuanceConfig

public let usePAR: Bool

public init(
clientId: ClientId,
authFlowRedirectionURI: URL,
authorizeIssuanceConfig: AuthorizeIssuanceConfig = .favorScopes
authorizeIssuanceConfig: AuthorizeIssuanceConfig = .favorScopes,
usePAR: Bool = true
) {
self.clientId = clientId
self.authFlowRedirectionURI = authFlowRedirectionURI
self.authorizeIssuanceConfig = authorizeIssuanceConfig
self.usePAR = usePAR
}
}

2 changes: 1 addition & 1 deletion Sources/Issuers/Issuer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public actor Issuer: IssuerType {

let (scopes, credentialConfogurationIdentifiers) = try scopesAndCredentialConfigurationIds(credentialOffer: credentialOffer)

let authorizationServerSupportsPar = credentialOffer.authorizationServerMetadata.authorizationServerSupportsPar
let authorizationServerSupportsPar = credentialOffer.authorizationServerMetadata.authorizationServerSupportsPar && config.usePAR

let state = StateValue().value

Expand Down
12 changes: 6 additions & 6 deletions Tests/Constants/TestsConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import Foundation
//let CREDENTIAL_ISSUER_PUBLIC_URL = "http://localhost:8080"

//let CREDENTIAL_ISSUER_PUBLIC_URL = "https://dev.issuer.eudiw.dev"
//let PID_SdJwtVC_config_id = "eu.europa.ec.eudiw.mdl_jwt_vc_json"
//let PID_MsoMdoc_config_id = "eu.europa.ec.eudiw.pid_mdoc"
//let MDL_config_id = "eu.europa.ec.eudiw.mdl_mdoc"
//let PID_SdJwtVC_config_id = "eu.europa.ec.eudi.mdl_jwt_vc_json"
//let PID_MsoMdoc_config_id = "eu.europa.ec.eudi.pid_mdoc"
//let MDL_config_id = "eu.europa.ec.eudi.mdl_mdoc"

//let CREDENTIAL_ISSUER_PUBLIC_URL = "https://localhost/pid-issuer"
let CREDENTIAL_ISSUER_PUBLIC_URL = "https://dev.issuer-backend.eudiw.dev"
Expand All @@ -30,9 +30,9 @@ let PID_MsoMdoc_config_id = "eu.europa.ec.eudi.pid_mso_mdoc"
let PID_SdJwtVC_config_id = "eu.europa.ec.eudi.pid_vc_sd_jwt"

//let CredentialIssuer_URL = "https://preprod.issuer.eudiw.dev/oidc"
//let PID_SdJwtVC_SCOPE = "eu.europa.ec.eudiw.pid_jwt_vc_json"
//let PID_MsoMdoc_SCOPE = "eu.europa.ec.eudiw.pid_mdoc"
//let PID_mDL_SCOPE = "eu.europa.ec.eudiw.mdl_mdoc"
//let PID_SdJwtVC_SCOPE = "eu.europa.ec.eudi.pid_jwt_vc_json"
//let PID_MsoMdoc_SCOPE = "eu.europa.ec.eudi.pid_mdoc"
//let PID_mDL_SCOPE = "eu.europa.ec.eudi.mdl_mdoc"

let CREDENTIAL_OFFER_QR_CODE_URL = """
eudi-openid4ci://credentialsOffer?credential_offer=%7B%22credential_issuer%22:%22https://dev.issuer-backend.eudiw.dev%22,%22credential_configuration_ids%22:[%22eu.europa.ec.eudi.pid_mso_mdoc%22,%22eu.europa.ec.eudi.pid_vc_sd_jwt%22,%22org.iso.18013.5.1.mDL%22],%22grants%22:%7B%22authorization_code%22:%7B%22authorization_server%22:%22https://dev.auth.eudiw.dev/realms/pid-issuer-realm%22%7D%7D%7D
Expand Down

0 comments on commit c7fa372

Please sign in to comment.