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 YES if 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 type property is set to a value other than CBLCameraAuthenticationTypeInteractWithCamera. Since no credentials need to be stored for such a context, this identifier isn’t needed.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nonnull) NSString *authenticationIdentifier;

    Swift

    var authenticationIdentifier: String { get }
  • Submit a cancellation for camera authentication. This will disconnect from the camera and deliver a CBLErrorCodeCancelledByUser error 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 type is CBLCameraAuthenticationTypeUsernameAndPassword.

    Declaration

    Objective-C

    - (void)submitUserName:(NSString *_Nonnull)userName
                  password:(NSString *_Nonnull)password;

    Swift

    func submitUserName(_ userName: String, password: String)

    Parameters

    userName

    The supplied username.

    password

    The supplied password.

  • Submit a numeric passcode for camera authentication. Only valid if type is CBLCameraAuthenticationTypeFourDigitNumericCode.

    Declaration

    Objective-C

    - (void)submitNumericCode:(NSString *_Nonnull)code;

    Swift

    func submitNumericCode(_ code: String)

    Parameters

    code

    The supplied code.