open class SAPcpmsUserBlockedObserver : SAPURLSessionObserving
Use this observer to detect user blocked errors from SAPcpms.
When a blocked response is detected, the provided handler is called with the specific blocking case - see
SAPcpmsUserBlockedError for more information.
The observer is in silent mode after this detection and will remain in this mode until a non-blocking response is detected. The observer will not call the provided handler while in silent mode.
All requests that are detected as blocking ones will result in the appropriate
HTTP status code used on SAPcpms to signal the blocked user.
public let blockedHTTPStatusCode: Int
HTTP header name used on SAPcpms to signal the blocked user.
public let blockedHTTPHeaderName: String
The handler to invoke when a blocked user is detected.
public let userBlockedHandler: (SAPcpmsUserBlockedError) -> Void
Instantiates the observer. This observer can be used to detect a blocked user on SAPcpms. When a blocked user is detected, the provided handler is invoked.
public init(userBlockedHandler: @escaping (SAPcpmsUserBlockedError) -> Void)
the block to invoke when a blocked user is detected