Skip to content

Commit

Permalink
Fix: Added function to return credential display by providing the typ…
Browse files Browse the repository at this point in the history
…e and issuer config
  • Loading branch information
josmilan committed Sep 3, 2024
1 parent 709133b commit b632d5f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/eudiWalletOidcIos/Service/IssueService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,16 @@ public class IssueService: NSObject, IssueServiceProtocol {
return nil
}
}

public func getCredentialDisplayFromIssuerConfig(issuerConfig: IssuerWellKnownConfiguration?, type: String?) -> Display? {
guard let issuerConfig = issuerConfig else { return nil }

if let credentialSupported = issuerConfig.credentialsSupported?.dataSharing?[type ?? ""] {
return credentialSupported.display?[0] ?? nil
} else {
return nil
}
}
}


Expand Down
2 changes: 2 additions & 0 deletions Sources/eudiWalletOidcIos/Service/IssueServiceProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,6 @@ protocol IssueServiceProtocol {

func getCryptoFromIssuerConfig(issuerConfig: IssuerWellKnownConfiguration?, type: String?) -> [String]?

func etCredentialDisplayFromIssuerConfig(issuerConfig: IssuerWellKnownConfiguration?, type: String?) -> Display?

}

0 comments on commit b632d5f

Please sign in to comment.