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
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected Stringalgorithmstatic booleanDEFAULT_IS_REUSABLEstatic OTPPolicyDEFAULT_POLICYprotected intdigitsprotected intinitialCounterprotected booleanisCodeReusableprotected static org.jboss.logging.Loggerloggerprotected intlookAheadWindowprotected intperiodstatic StringREALM_REUSABLE_CODE_ATTRIBUTEprotected Stringtype
 - 
Constructor SummaryConstructors Constructor Description OTPPolicy()OTPPolicy(String type, String algorithm, int initialCounter, int digits, int lookAheadWindow, int period)OTPPolicy(String type, String algorithm, int initialCounter, int digits, int lookAheadWindow, int period, boolean isCodeReusable)
 - 
Method SummaryAll 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()StringgetType()booleanisCodeReusable()voidsetAlgorithm(String algorithm)voidsetCodeReusable(boolean isReusable)voidsetDigits(int digits)voidsetInitialCounter(int initialCounter)voidsetLookAheadWindow(int lookAheadWindow)voidsetPeriod(int period)voidsetType(String type)
 
- 
- 
- 
Field Detail- 
loggerprotected static final org.jboss.logging.Logger logger 
 - 
typeprotected String type 
 - 
algorithmprotected String algorithm 
 - 
initialCounterprotected int initialCounter 
 - 
digitsprotected int digits 
 - 
lookAheadWindowprotected int lookAheadWindow 
 - 
periodprotected int period 
 - 
isCodeReusableprotected boolean isCodeReusable 
 - 
DEFAULT_POLICYpublic static OTPPolicy DEFAULT_POLICY 
 - 
DEFAULT_IS_REUSABLEpublic static final boolean DEFAULT_IS_REUSABLE - See Also:
- Constant Field Values
 
 - 
REALM_REUSABLE_CODE_ATTRIBUTEpublic static final String REALM_REUSABLE_CODE_ATTRIBUTE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getAlgorithmKeypublic String getAlgorithmKey() 
 - 
getTypepublic String getType() 
 - 
setTypepublic void setType(String type) 
 - 
getAlgorithmpublic String getAlgorithm() 
 - 
setAlgorithmpublic void setAlgorithm(String algorithm) 
 - 
getInitialCounterpublic int getInitialCounter() 
 - 
setInitialCounterpublic void setInitialCounter(int initialCounter) 
 - 
getDigitspublic int getDigits() 
 - 
setDigitspublic void setDigits(int digits) 
 - 
getLookAheadWindowpublic int getLookAheadWindow() 
 - 
setLookAheadWindowpublic void setLookAheadWindow(int lookAheadWindow) 
 - 
getPeriodpublic int getPeriod() 
 - 
setPeriodpublic void setPeriod(int period) 
 - 
isCodeReusablepublic boolean isCodeReusable() 
 - 
setCodeReusablepublic void setCodeReusable(boolean isReusable) 
 - 
getKeyURIpublic 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
 
 
- 
 
-