Package edu.vt.middleware.ldap.ed
Class DuoFactor
- java.lang.Object
-
- edu.vt.middleware.ldap.ed.DuoFactor
-
- All Implemented Interfaces:
MultiFactor
public class DuoFactor extends Object implements MultiFactor
Represents a second factor to present to login.directory.vt.edu (see: Documentation)- AUTO
- PHONE
- SMS
- PASSCODE
- PUSH
- Author:
- Middleware Services
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDuoFactor.TypeEnum defining the DUO second factor options.
-
Constructor Summary
Constructors Constructor Description DuoFactor(DuoFactor.Type typeParameter)Constructor which provides second factor type (ex:DuoFactor.Type.AUTO,DuoFactor.Type.PHONE)DuoFactor(DuoFactor.Type typeParameter, int indexParameter)Constructor which provides second factor type, and index (ex:DuoFactor.Type.PHONE, 2) Useful for multiple factors registered.DuoFactor(DuoFactor.Type typeParameter, String valueParameter)Constructor which provides second factor type, and value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DuoFactorgetInstance(String mfaValue)Returns aDuoFactorfromEdCli.MFA_VALUE_OPTIONcommand-line arguments.MultiFactorTypegetType()Returns the type associated with this multi-factor instance.org.ldaptive.CredentialgetValue(org.ldaptive.Credential credential)Returns the processedCredentialby this factor.
-
-
-
Constructor Detail
-
DuoFactor
public DuoFactor(DuoFactor.Type typeParameter, String valueParameter)
Constructor which provides second factor type, and value. (ex:DuoFactor.Type.PASSCODE, 066432)- Parameters:
typeParameter-DuoFactor.Typeof second-factorvalueParameter- value of second-factor
-
DuoFactor
public DuoFactor(DuoFactor.Type typeParameter, int indexParameter)
Constructor which provides second factor type, and index (ex:DuoFactor.Type.PHONE, 2) Useful for multiple factors registered.- Parameters:
typeParameter-DuoFactor.Typeof second-factorindexParameter- index of second-factor
-
DuoFactor
public DuoFactor(DuoFactor.Type typeParameter)
Constructor which provides second factor type (ex:DuoFactor.Type.AUTO,DuoFactor.Type.PHONE)- Parameters:
typeParameter-DuoFactor.Typeof second-factor
-
-
Method Detail
-
getValue
public org.ldaptive.Credential getValue(org.ldaptive.Credential credential)
Description copied from interface:MultiFactorReturns the processedCredentialby this factor.- Specified by:
getValuein interfaceMultiFactor- Parameters:
credential-Credentialto derive from- Returns:
- Generated value
-
getType
public MultiFactorType getType()
Description copied from interface:MultiFactorReturns the type associated with this multi-factor instance.- Specified by:
getTypein interfaceMultiFactor- Returns:
MultiFactorType
-
getInstance
public static DuoFactor getInstance(String mfaValue) throws IllegalArgumentException
Returns aDuoFactorfromEdCli.MFA_VALUE_OPTIONcommand-line arguments.- Parameters:
mfaValue-EdCli.MFA_VALUE_OPTIONprovided- Returns:
DuoFactor- Throws:
IllegalArgumentException- IfDuoFactorcannot be instantiated
-
-