0.0.3 • Published 7 years ago
opus-auth v0.0.3
SK authentication service connector
This is a package for handling communication with SK authentication service of Opus.
There are two functions available:
authorize(authorizeRequest);
export interface AuthorizeRequest {
mobile: string;
idcode?: string;
}
export interface AuthorizeResponse {
sessionId: number;
challengeId: string;
}
getProfile(getProfileRequest);
export interface GetProfileRequest {
sessionId: number;
timeout?: number;
}
export interface GetProfileResponse {
firstName: string;
lastName: string;
personalCode: string;
}
Usual flow would be calling authorize using mobile phone number. Then using the sessionId from the response to call getProfile. Default timeout for getProfile is 30 seconds. If profile is not successfully retrieved by then (eg. user doesn't input PIN1 on mobile device) 'pollingTimeout' error is thrown.