Identification Explains how to start an identity verification
The standard process allows your users to take a photo of either their Passport, National ID or Drivers License. You can customize this by limiting the types of documents you accept (i.e. only Passports) or requesting up to two different documents (i.e. first a Drivers License, then Passport or National ID)
Implementation
Make your class conform to AuthenteqIdentificationDelegate
protocol
Use your client keys to create a UIViewController
from Authenteq SDK
Present returned UIViewController
modally
Handle result in your delegate implementation
Example to Start an Identification
Please update the below code with your Client ID and Client Secret from your Customer Dashboard . To support multiple documents and other flow settings also use the Customer Dashboard.
Flow ID specify which verification flow to use. Flow IDs are defined in the Customer Dashboard, section Verification Flow.
We suggest adding this code to the relevant Storyboard or ViewController.
Swift Objective-C
Copy import AuthenteqFlow
class ExampleViewController : UIViewController {
func identification () {
let identificationParams = IdentificationParams (
clientId : "<YOUR CLIENT ID>" ,
clientSecret : "<YOUR CLIENT SECRET>" ,
flowId : "<flow ID>" // optional
)
let viewController = AuthenteqFlow.instance. identificationViewController (
with : identificationParams,
delegate : self
)
viewController.modalPresentationStyle = .fullScreen
present ( viewController, animated : true )
}
}
extension ExampleViewController : AuthenteqIdentificationDelegate {
func authenteqDidFinishIdentification ( with result : IdentificationResult) {
// Handle result
presentedViewController ? . dismiss ( animated : true )
}
func authenteqDidFailIdentification ( with error : AuthenteqFlowError) {
// Handle error
presentedViewController ? . dismiss ( animated : true )
}
}
Copy @import AuthenteqFlow;
@interface ExampleViewController: UIViewController <AuthenteqIdentificationDelegate>
@end
@implementation ExampleViewController
- (void)identification {
IdentificationParams *params = [[IdentificationParams alloc]
initWithClientId:@"<YOUR CLIENT ID>"
clientSecret:@"<YOUR CLIENT SECRET>"
flowId:@"<flow ID>"];
UIViewController *viewController = [[AuthenteqFlow instance]
identificationViewControllerWith:params
delegate:self];
viewController.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:viewController animated:true completion:nil];
}
#pragma MARK - AuthenteqIdentificationDelegate
- (void)authenteqDidFinishIdentificationWith:(IdentificationResult *)result {
// Handle result
[self.presentedViewController dismissViewControllerAnimated:true completion:nil];
}
- (void)authenteqDidFailIdentificationWith:(enum AuthenteqFlowError)error {
// Handle error
[self.presentedViewController dismissViewControllerAnimated:true completion:nil];
}
@end
Start an Identification providing authentication Token
Identification can be started by providing the authentication token obtained separately (see section Authentication Token for details).
The optional "Flow ID " can be specified when requesting the authentication token.
Compare to the previous example, just replace clientSecret
parameter with Token
as described in the following example:
Swift Objective-C
Copy import AuthenteqFlow
class ExampleViewController : UIViewController {
func identification () {
let identificationParams = IdentificationParams (
clientId : "<YOUR CLIENT ID>" ,
token : "<AUTHENTICATION TOKEN>"
)
let viewController = AuthenteqFlow.instance. identificationViewController (
with : identificationParams,
delegate : self
)
viewController.modalPresentationStyle = .fullScreen
present ( viewController, animated : true )
}
}
extension ExampleViewController : AuthenteqIdentificationDelegate {
func authenteqDidFinishIdentification ( with result : IdentificationResult) {
// Handle result
presentedViewController ? . dismiss ( animated : true )
}
func authenteqDidFailIdentification ( with error : AuthenteqFlowError) {
// Handle error
presentedViewController ? . dismiss ( animated : true )
}
}
Copy @import AuthenteqFlow;
@interface ExampleViewController: UIViewController <AuthenteqIdentificationDelegate>
@end
@implementation ExampleViewController
- (void)identification {
UIViewController *viewController =
[[AuthenteqFlow instance]
identificationViewControllerWith:@"<YOUR CLIENT ID>"
token:@"<AUTHENTICATION TOKEN>"
delegate:self];
[self presentViewController:viewController animated:true completion:nil];
}
#pragma MARK - AuthenteqIdentificationDelegate
- (void)authenteqDidFinishIdentificationWith:(IdentificationResult *)result {
// Handle result
[self.presentedViewController dismissViewControllerAnimated:true completion:nil];
}
- (void)authenteqDidFailIdentificationWith:(enum AuthenteqFlowError)error {
// Handle error
[self.presentedViewController dismissViewControllerAnimated:true completion:nil];
}
@end
Authentication token can only be used for a single verification. Always generate a new token before start a new verification.