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
SAPURLSessioninstance 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
sapUrlSessionA preconfigured instance of
SAPURLSessionwith the required observers needed to connect to Mobile Services.settingsParametersThe SAPcpmsSettingsParameters necessary to connect to Mobile Services.
destinationThe destination for which OAuth 2.0 authorization is required.