Skip to content

Commit

Permalink
Fix: Added constructor in Issuer config
Browse files Browse the repository at this point in the history
  • Loading branch information
josmilan committed Jul 8, 2024
1 parent 80edda9 commit ba826f0
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions Sources/eudiWalletOidcIos/Model/IssuerWellKnownConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ public struct Display{
backgroundColor = from.backgroundColor
textColor = from.textColor
}

public init(mName: String, mLocation:String, mLocale: String?, mDescription: String, mCover: DisplayCover?, mLogo: DisplayCover?, mBackgroundColor: String?, mTextColor: String?) {
name = mName
location = mLocation
locale = mLocale
description = mDescription
cover = mCover
logo = mLogo
backgroundColor = mBackgroundColor
textColor = mTextColor
}
}
public struct TrustFrameworkInIssuer {
public let name: String?
Expand Down Expand Up @@ -157,6 +168,11 @@ public struct DisplayCover{
url = from.url
altText = from.altText
}

public init(mUrl: String?, mAltText: String?) {
url = mUrl
altText = mAltText
}
}


Expand Down Expand Up @@ -194,6 +210,20 @@ public struct IssuerWellKnownConfiguration {

}

public init(mCredentialIssuer: String?,
mAuthorizationServer: String?,
mCredentialEndpoint: String?,
mDeferredCredentialEndpoint: String?,
mDisplay: Display?) {
credentialIssuer = nil
authorizationServer = nil
credentialEndpoint = nil
deferredCredentialEndpoint = nil
display = mDisplay != nil ? [mDisplay!] : nil
credentialsSupported = nil
error = nil
}

init(from: EUDIError) {
error = from
credentialIssuer = nil
Expand All @@ -203,7 +233,5 @@ public struct IssuerWellKnownConfiguration {
display = nil
credentialsSupported = nil
}


}

0 comments on commit ba826f0

Please sign in to comment.