Class HvlOAuthGoogleAuthenticatorServiceImpl
java.lang.Object
tr.com.havelsan.javarch.oauth.google.authenticator.provider.HvlOAuthGoogleAuthenticatorServiceImpl
- All Implemented Interfaces:
HvlOAuthGoogleAuthenticatorService
@Service
public class HvlOAuthGoogleAuthenticatorServiceImpl
extends Object
implements HvlOAuthGoogleAuthenticatorService
The type HvlOAuthGoogleAuthenticatorServiceImpl.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionHvlOAuthGoogleAuthenticatorServiceImpl
(dev.samstevens.totp.secret.SecretGenerator secretGenerator) Instantiates a new Hvl o auth google authenticator service. -
Method Summary
Modifier and TypeMethodDescriptionGenerate secret key string.Gets qr code.boolean
verifyTotp
(String code, String secret) Verify totp boolean.
-
Field Details
-
QR_CODE_EXTENSION
- See Also:
-
IMAGE_WIDTH
public static final int IMAGE_WIDTH- See Also:
-
IMAGE_HEIGHT
public static final int IMAGE_HEIGHT- See Also:
-
-
Constructor Details
-
HvlOAuthGoogleAuthenticatorServiceImpl
public HvlOAuthGoogleAuthenticatorServiceImpl(dev.samstevens.totp.secret.SecretGenerator secretGenerator) Instantiates a new Hvl o auth google authenticator service.- Parameters:
secretGenerator
- the secret generator
-
-
Method Details
-
generateSecretKey
Generate secret key string.- Specified by:
generateSecretKey
in interfaceHvlOAuthGoogleAuthenticatorService
- Returns:
- the string
-
getQRCode
Gets qr code.- Specified by:
getQRCode
in interfaceHvlOAuthGoogleAuthenticatorService
- Parameters:
secret
- the secret- Returns:
- the QR Code
- Throws:
Exception
- the exception
-
verifyTotp
Verify totp boolean.- Specified by:
verifyTotp
in interfaceHvlOAuthGoogleAuthenticatorService
- Parameters:
code
- the codesecret
- the secret- Returns:
- the boolean
-