SAPcpmsUserIdentityDiscoveryConfigurationTransformer
open class SAPcpmsUserIdentityDiscoveryConfigurationTransformer : ConfigurationTransforming
Transforms the DisoveryService configuration data to a SAPcpmsUserIdentityConfigurationParameters
and an OAuth2AuthenticationParameters
and returns with a [OnboardingInfoKey: Any]
dictionary associating the key
parameter with the SAPcpmsUserIdentityConfigurationParameters
and the oauthKey
with the OAuth2AuthenticationParameters
- The structure in the dictionary should follow this JSON structure:
{ "com.sap.mobilesecure.certificateService.attributesEndpoint":"", "com.sap.mobilesecure.certificateService.requestEndpoint":"", "com.sap.mobilesecure.certificateService.retireEndpoint":"", "com.sap.mobilesecure.certificateService.publicKeyPinSet":[], "com.sap.mobilesecure.certificateService.authType":{ "type":"oauth", "authorizationEndpoint":"", "tokenEndpoint":"", "client_id":"", "redirect_uri":"" } }
-
the key used to store the User Identity Configuration Parameters in the result
Declaration
Swift
public let userIdentityConfigurationParametersKey: OnboardingInfoKey
-
the key used to store the OAuth2 Authentication Parameters in the result
Declaration
Swift
public let oauth2AuthenticationParametersKey: OnboardingInfoKey
-
Initializes a new instance
Declaration
Swift
public init(userIdentityConfigurationParametersKey: OnboardingInfoKey = .sapcpmsUserIdentityDiscoveryConfigurationParameters, oauth2AuthenticationParametersKey: OnboardingInfoKey = .sapcpmsUserIdentityDiscoveryOAuth2AuthenticationParameters)
Parameters
userIdentityConfigurationParametersKey
the key which under the transformed
SAPcpmsUserIdentityConfigurationParameters
will be setdiscoveryOAuth2AuthenticationParametersKey
the key which under the transformed
OAuth2AuthenticationParameters
will be set -
Transforms the input data to a a
SAPcpmsUserIdentityConfigurationParameters
and anOAuth2AuthenticationParameters
Throws
OnboardingError.invalidArgumentDeclaration
Swift
open func transform(config: Any) throws -> [OnboardingInfoKey : Any]
Parameters
config
input data to be transformed; must be a [String:Any] containing valid DiscoveryService config structure
Return Value
a
[OnboardingInfoKey: Any]
dictionary where the two tranformed object are assiciated with the keys provided in the initializer