public class OTPPolicy extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
OTPPolicy.FreeOTP |
static class |
OTPPolicy.GoogleAuthenticator |
static interface |
OTPPolicy.OtpApp |
Modifier and Type | Field and Description |
---|---|
protected String |
algorithm |
static OTPPolicy |
DEFAULT_POLICY |
protected int |
digits |
protected int |
initialCounter |
protected static org.jboss.logging.Logger |
logger |
protected int |
lookAheadWindow |
protected int |
period |
protected String |
type |
Constructor and Description |
---|
OTPPolicy() |
OTPPolicy(String type,
String algorithm,
int initialCounter,
int digits,
int lookAheadWindow,
int period) |
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithm() |
String |
getAlgorithmKey() |
int |
getDigits() |
int |
getInitialCounter() |
String |
getKeyURI(RealmModel realm,
UserModel user,
String secret)
Constructs the
otpauth:// URI based on the Key-Uri-Format. |
int |
getLookAheadWindow() |
int |
getPeriod() |
List<String> |
getSupportedApplications() |
String |
getType() |
void |
setAlgorithm(String algorithm) |
void |
setDigits(int digits) |
void |
setInitialCounter(int initialCounter) |
void |
setLookAheadWindow(int lookAheadWindow) |
void |
setPeriod(int period) |
void |
setType(String type) |
protected static final org.jboss.logging.Logger logger
protected String type
protected String algorithm
protected int initialCounter
protected int digits
protected int lookAheadWindow
protected int period
public static OTPPolicy DEFAULT_POLICY
public String getAlgorithmKey()
public String getType()
public void setType(String type)
public String getAlgorithm()
public void setAlgorithm(String algorithm)
public int getInitialCounter()
public void setInitialCounter(int initialCounter)
public int getDigits()
public void setDigits(int digits)
public int getLookAheadWindow()
public void setLookAheadWindow(int lookAheadWindow)
public int getPeriod()
public void setPeriod(int period)
public String getKeyURI(RealmModel realm, UserModel user, String secret)
otpauth://
URI based on the Key-Uri-Format.realm
- user
- secret
- otpauth://
URICopyright © 2019 JBoss by Red Hat. All rights reserved.