SLSConfigurationParameters

public struct SLSConfigurationParameters

Input parameters to be able to connect to the SLS server

  • UTF-8 encoded string with X.509 subjectName

    Declaration

    Swift

    public let subjectName: String
  • Comma separated RFC 822 values

    Declaration

    Swift

    public let subjectAltNamesRfc822: String
  • Comma separated DNS names

    Declaration

    Swift

    public let subjectAltNamesDNS: String
  • URL that authenticate the request

    Declaration

    Swift

    public let loginURL: URL
  • URL that response with a certificate for a CSR request

    Declaration

    Swift

    public let certificateURL: URL
  • Initializer of SLSConfigurationParameters

    Declaration

    Swift

    public init(loginURL: URL, certificateURL: URL, subjectName: String = "", subjectAltNamesRfc822: String = "", subjectAltNamesDNS: String = "")

    Parameters

    loginURL

    URL that authenticate the request

    certificateURL

    URL that response with a certificate for a CSR request

    subjectName

    UTF-8 encoded string with X.509 subjectName

    subjectAltNamesRfc822

    Comma separated RFC 822 values

    subjectAltNamesDNS

    Comma separated DNS names

  • Initializer of SLSConfigurationParameters

    Declaration

    Swift

    public init?(slsServerURL: URL, profile: String, subjectName: String = "", subjectAltNamesRfc822: String = "", subjectAltNamesDNS: String = "")

    Parameters

    slsServerURL

    SLS server URL

    profile

    Profile GUID. It’s generated by SLS Admin Console.

    subjectName

    UTF-8 encoded string with X.509 subjectName

    subjectAltNamesRfc822

    Comma separated RFC 822 values

    subjectAltNamesDNS

    Comma separated DNS names

  • Initializer of SLSConfigurationParameters

    Declaration

    Swift

    public init?(baseURL: URL, applicationID: String, subjectName: String = "", subjectAltNamesRfc822: String = "", subjectAltNamesDNS: String = "")

    Parameters

    baseURL

    base URL

    applicationID

    Application ID on SAPcpms server.

    subjectName

    UTF-8 encoded string with X.509 subjectName

    subjectAltNamesRfc822

    Comma separated RFC 822 values

    subjectAltNamesDNS

    Comma separated DNS names

  • Initializer of SLSConfigurationParameters

    Declaration

    Swift

    public init?(settingsParameters: SAPcpmsSettingsParameters, subjectName: String = "", subjectAltNamesRfc822: String = "", subjectAltNamesDNS: String = "")

    Parameters

    settingsParameters

    SAPcpms settings metadata to be able to concatenate the SAPcpms URL

    subjectName

    UTF-8 encoded string with X.509 subjectName

    subjectAltNamesRfc822

    Comma separated RFC 822 values

    subjectAltNamesDNS

    Comma separated DNS names

  • Instantiates the SLSConfigurationParameters from the SAP Cloud Platform configuration object. The configuration object is expected in the following format:

    let configuration: [String: String] = [
        "serverURL": "<#server URL String#>",
        "profile": "<#profile#>",
        "subjectName": "<#subject name#>", // Optional - default is an empty String
        "subjectAltNamesRFC822": "<#subject alt name#>", // Optional - default is an empty String
        "subjectAltNamesDNS": "<#subject alt name#>" // Optional - default is an empty String
    ]
    

    The URL strings are converted to URL using the URL object’s string initializer. If the initializer returns nil, an error is raised.

    Throws

    ConfigurationError if the configuration is not matching.

    Declaration

    Swift

    public init(discoveryServiceConfig config: Any) throws

    Parameters

    config

    The SAP Cloud Platform configuration object