SAPJouleAuthenticationHandler

public class SAPJouleAuthenticationHandler : SAPWebSocketAuthenticationHandling

SAPJouleAuthenticationHandler is responsible for obtaining OAuth 2.0 authorization for a given destination.

The SAPURLSession provided to init to this class must be preconfigured with the required observers needed to connect to Mobile Services.

SAPJouleAuthenticationHandler does not add or manage these observers itself. Supplying a session without the necessary Mobile Services observers may result in authentication failures or unexpected network behavior.

  • Creates an authentication handler to obtain OAuth 2.0 authorization for the specified destination.

    This initializer requires a SAPURLSession instance that is already configured with the necessary observers to communicate with Mobile Services. The session is used to perform the authorization web service call to the OAuth endpoint and retrieve an access token for the given destination.

    Declaration

    Swift

    required public init(with sapUrlSession: SAPURLSession, settingsParameters: SAPcpmsSettingsParameters, destination: String)

    Parameters

    sapUrlSession

    A preconfigured instance of SAPURLSession with the required observers needed to connect to Mobile Services.

    settingsParameters

    The SAPcpmsSettingsParameters necessary to connect to Mobile Services.

    destination

    The destination for which OAuth 2.0 authorization is required.