CBLCameraAuthenticationContext
Objective-C
@protocol CBLCameraAuthenticationContext <NSObject>
Swift
protocol CameraAuthenticationContext : NSObjectProtocol
A camera authentication context represents a request for authentication from the camera. Responses are submitted via this context object.
-
The type of authentication the camera is requesting.
Declaration
Objective-C
@property (nonatomic, readonly) CBLCameraAuthenticationType type;Swift
var type: CameraAuthenticationType { get } -
Returns
YESif this authentication context is being delivered immediately after a previous authentication submission was rejected. This allows (for example) to re-ask for a username/password, particularly if the previous submission was from saved credentials.Declaration
Objective-C
@property (nonatomic, readonly) BOOL previousSubmissionRejected;Swift
var previousSubmissionRejected: Bool { get } -
A unique, stable identifier for the camera, appropriate for using as a key for storing credentials in (for e.g.) the Keychain.
CascableCore will do its best to make this identifier unique on a per-camera basis when the
typeproperty is set to a value other thanCBLCameraAuthenticationTypeInteractWithCameraorCBLCameraAuthenticationTypeConnectToWiFiNetwork. Since no credentials need to be stored for such contexts, this identifier isn’t needed.Declaration
Objective-C
@property (nonatomic, copy, readonly, nonnull) NSString *authenticationIdentifier;Swift
var authenticationIdentifier: String { get } -
The SSID of the WiFi network to connect to. Only valid if
typeisCBLCameraAuthenticationTypeConnectToWiFiNetwork.Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *wiFiNetworkSSID;Swift
var wiFiNetworkSSID: String? { get } -
The password of the WiFi network to connect to. Only valid if
typeisCBLCameraAuthenticationTypeConnectToWiFiNetwork.Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *wiFiNetworkPassword;Swift
var wiFiNetworkPassword: String? { get } -
Submit a cancellation for camera authentication. This will disconnect from the camera and deliver a
CBLErrorCodeCancelledByUsererror to the connection completion handler. Valid for all authentication types.Declaration
Objective-C
- (void)submitCancellation;Swift
func submitCancellation() -
Submit a username and password for camera authentication. Only valid if
typeisCBLCameraAuthenticationTypeUsernameAndPassword.Declaration
Objective-C
- (void)submitUserName:(NSString *_Nonnull)userName password:(NSString *_Nonnull)password;Swift
func submitUserName(_ userName: String, password: String)Parameters
userNameThe supplied username.
passwordThe supplied password.
-
Submit a numeric passcode for camera authentication. Only valid if
typeisCBLCameraAuthenticationTypeFourDigitNumericCode.Declaration
Objective-C
- (void)submitNumericCode:(NSString *_Nonnull)code;Swift
func submitNumericCode(_ code: String)Parameters
codeThe supplied code.
-
Submit that the given WiFi network has successfully been joined. Only valid if
typeisCBLCameraAuthenticationTypeConnectToWiFiNetwork.Declaration
Objective-C
- (void)submitHasConnectedToWiFiNetwork;Swift
func submitHasConnectedToWiFiNetwork()