Package org.keycloak.models
Class OTPPolicy
- java.lang.Object
-
- org.keycloak.models.OTPPolicy
-
- All Implemented Interfaces:
Serializable
public class OTPPolicy extends Object implements Serializable
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOTPPolicy.FreeOTPstatic classOTPPolicy.GoogleAuthenticatorstatic interfaceOTPPolicy.OtpApp
-
Field Summary
Fields Modifier and Type Field Description protected Stringalgorithmstatic OTPPolicyDEFAULT_POLICYprotected intdigitsprotected intinitialCounterprotected static org.jboss.logging.Loggerloggerprotected intlookAheadWindowprotected intperiodprotected Stringtype
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAlgorithm()StringgetAlgorithmKey()intgetDigits()intgetInitialCounter()StringgetKeyURI(RealmModel realm, UserModel user, String secret)Constructs theotpauth://URI based on the Key-Uri-Format.intgetLookAheadWindow()intgetPeriod()List<String>getSupportedApplications()StringgetType()voidsetAlgorithm(String algorithm)voidsetDigits(int digits)voidsetInitialCounter(int initialCounter)voidsetLookAheadWindow(int lookAheadWindow)voidsetPeriod(int period)voidsetType(String type)
-
-
-
Field Detail
-
logger
protected static final org.jboss.logging.Logger logger
-
type
protected String type
-
algorithm
protected String algorithm
-
initialCounter
protected int initialCounter
-
digits
protected int digits
-
lookAheadWindow
protected int lookAheadWindow
-
period
protected int period
-
DEFAULT_POLICY
public static OTPPolicy DEFAULT_POLICY
-
-
Method Detail
-
getAlgorithmKey
public String getAlgorithmKey()
-
getType
public String getType()
-
setType
public void setType(String type)
-
getAlgorithm
public String getAlgorithm()
-
setAlgorithm
public void setAlgorithm(String algorithm)
-
getInitialCounter
public int getInitialCounter()
-
setInitialCounter
public void setInitialCounter(int initialCounter)
-
getDigits
public int getDigits()
-
setDigits
public void setDigits(int digits)
-
getLookAheadWindow
public int getLookAheadWindow()
-
setLookAheadWindow
public void setLookAheadWindow(int lookAheadWindow)
-
getPeriod
public int getPeriod()
-
setPeriod
public void setPeriod(int period)
-
getKeyURI
public String getKeyURI(RealmModel realm, UserModel user, String secret)
Constructs theotpauth://URI based on the Key-Uri-Format.- Parameters:
realm-user-secret-- Returns:
- the
otpauth://URI
-
-