Click or drag to resize

GetTOTPAuthURI 메서드

TOTP(Time-based OTP) URI를 생성합니다.

형식
syntax
authUri = objOtp.GetTOTPAuthURI(issuer, account)

objOtp

Required. GoogleOTP 오브젝트

authUri

String. 생성한 TOTP URI를 반환합니다.

issuer

String. 발급자 정보를 지정합니다.

account

String. 계정 정보를 지정합니다.

설명

Google OTP 앱에서 인식할 수 있는 QR 코드 이미지를 생성하기 위한 URI 문자열을 생성해서 반환합니다. GetQRCodeImage 메서드 또는 SaveQRCodeImage 메서드를 사용해 QR 코드 이미지를 생성합니다.

예제
새로운 비밀키 생성
Set otp = Server.CreateObject("TABS.GoogleOTP")
otp.MakeSecretKey
authUri = otp.GetTOTPAuthURI("탭스랩", "guest")
otp.SaveQRCodeImage(authUri, 4, "#000000", "#ffffff", "d:\images\qrcode.png")
기존 키 사용
Set otp = Server.CreateObject("TABS.GoogleOTP")
otp.SecretKey = "EYMSKXXCTNIB3H3Z"
authUri = otp.GetTOTPAuthURI("탭스랩", "guest")
otp.SaveQRCodeImage(authUri, 4, "#000000", "#ffffff", "d:\images\qrcode.png")