Package org.cyclos.impl.access
Interface TotpServiceLocal
-
- All Superinterfaces:
Service,TotpService
public interface TotpServiceLocal extends TotpService
Local interface forTotpService
-
-
Field Summary
Fields Modifier and Type Field Description static com.bastiaanjansen.otp.HMACAlgorithmALGORITHM-
Fields inherited from interface org.cyclos.services.access.TotpService
TOTP_LENGTH, TOTP_VALUE_PREFIX
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcheck(BasicUser basicUser, String value)Checks whether the given TOTP value is valid for the given userTotpSecretStatusgetStatus(BasicUser user)Returns the TOTP secret status for the given userdefault booleanisActive(BasicUser user)Returns whether the TOTP secret status for the given user isTotpSecretStatus.ACTIVEdefault booleanisPendingActivation(BasicUser user)Returns whether the TOTP secret status for the given user is eitherTotpSecretStatus.NEVER_CREATEDorTotpSecretStatus.PENDINGbooleanisTotp(String value)Returns whether the given value corresponds to a TOTP value-
Methods inherited from interface org.cyclos.services.access.TotpService
activate, getData, remove, requestActivationCode, verifyActivationCode
-
-
-
-
Method Detail
-
check
void check(BasicUser basicUser, String value) throws InvalidTotpException
Checks whether the given TOTP value is valid for the given user- Throws:
InvalidTotpException
-
getStatus
TotpSecretStatus getStatus(BasicUser user)
Returns the TOTP secret status for the given user
-
isActive
default boolean isActive(BasicUser user)
Returns whether the TOTP secret status for the given user isTotpSecretStatus.ACTIVE
-
isPendingActivation
default boolean isPendingActivation(BasicUser user)
Returns whether the TOTP secret status for the given user is eitherTotpSecretStatus.NEVER_CREATEDorTotpSecretStatus.PENDING
-
isTotp
boolean isTotp(String value)
Returns whether the given value corresponds to a TOTP value
-
-