3min

API Reference

Shared Instance API

/// Shared Instance to interact with the SDK public static let shared: BlokSecFramework.BlokSecSDK?

User Registration API

/** This method is used to register the User with the specified Registration Request - Parameters: - request: request of type BSRegistrationRequest containing relevant information to get registered */ func registerUser(request: BlokSecFramework.BSRegistrationRequest, withCompletion completion: BlokSecFramework.BlokSecSDKStartCompletion?)

/** This Method is used to raise the registration request for use - Parameters: - request: registration request of type BSRaiseRegistrationRequest - completion: Completion Closure providing the registration id of user */ func raiseRegistrationRequest(request: BlokSecFramework.BSRaiseRegistrationRequest, withCompletion completion: @escaping BlokSecFramework.RaiseRegistrationRequestResponse)

Account Association APIs

/** This Method is used to get the registration details of user - Parameters: - registrationId: registration Id to fetch the details of registration of user - completion: Completion Closure providing the registration details of user of type RegistrationDetailsResponse */ func getRegistrationDetails(registrationId: String, completion: @escaping BlokSecFramework.RegistrationDetailsResponse)

/** This Method is used to complete the registration of account - Parameters: - accountRequest: account Request containing the meta data to create the account - completion: Completion Closure providing the created account or error of type CreateAccountResponse */ func completeRegistration(accountRequest: BlokSecFramework.BSAccountRequest, completion: @escaping BlokSecFramework.CreateAccountResponse)

Authentication APIs

/** This Method is used to raise the authentication request for use - Parameters: - request: auth request of type BSRaiseAuthenticationRequest - completion: Completion Closure providing the registration id of user */ func raiseAuthenticationRequest(request: BlokSecFramework.BSRaiseAuthenticationRequest, withCompletion completion: @escaping BlokSecFramework.RaiseAuthenticationRequestResponse) /** This Method is used to authenticate the user for particular application - Parameters: - requestId: Auth request Id received in universal URL or push notification to authenticated - completion: Completion Closure providing the response of authentication or error of type AuthenticateRequestResponse */ func getAuthenticationRequest(requestId: String, completion: @escaping BlokSecFramework.AuthenticateRequestResponse)

/** This Method is used to authenticate the user for particular application - Parameters: - latestpushNotificationRequestModel: Auth request Id received in universal URL or push notification to authenticated - completion: Completion Closure providing the response of authentication or error of type AuthenticateUserResponse */ func sendAuthenticationResponse(authRequest: BlokSecFramework.BSAuthenticationRequest, completion: @escaping BlokSecFramework.AuthenticateUserResponse)

Backup API

/** This method returns the QR Image for the backed up account with the specified passphrase - Parameters: - passphrase: Passphrase entered by user to backup the Account - Returns: Returns QR Code Image associated to the backup */ func createBackupQRCode(withPass passphrase: String) -> UIImage?

Restore API

/** This method is used to restore the Account from QR Info with the passphrase used during the backup - Parameters: - qrInfo: QR Info Retrieved by reading the QR of type String - passphrase: Passphrase entered by user to restore the Account of type String - deviceToken: Device Token in which the account needs to be restored of type optional String - completion: Completion Closure of type UserProfileCompletion that provides information of restored account */ func restoreFromQRCode(_ qrInfo: String, usingPassPhrase passphrase: String, inDevice deviceToken: String?, withCompletion completion: @escaping BlokSecFramework.UserProfileCompletion) throws Helper APIs

/** This Method is used to fetch the user Profile from Server - Parameters: - completion: Completion Closure providing the response of user profile or error of type UserProfileCompletion */ func getUserProfile(withCompletion completion: @escaping BlokSecFramework.UserProfileCompletion)



Updated 16 Apr 2022
Did this page help you?
Yes
No