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 class
DuoFactor.Type
Enum 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 DuoFactor
getInstance(String mfaValue)
Returns aDuoFactor
fromEdCli.MFA_VALUE_OPTION
command-line arguments.MultiFactorType
getType()
Returns the type associated with this multi-factor instance.org.ldaptive.Credential
getValue(org.ldaptive.Credential credential)
Returns the processedCredential
by 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.Type
of 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.Type
of 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.Type
of second-factor
-
-
Method Detail
-
getValue
public org.ldaptive.Credential getValue(org.ldaptive.Credential credential)
Description copied from interface:MultiFactor
Returns the processedCredential
by this factor.- Specified by:
getValue
in interfaceMultiFactor
- Parameters:
credential
-Credential
to derive from- Returns:
- Generated value
-
getType
public MultiFactorType getType()
Description copied from interface:MultiFactor
Returns the type associated with this multi-factor instance.- Specified by:
getType
in interfaceMultiFactor
- Returns:
MultiFactorType
-
getInstance
public static DuoFactor getInstance(String mfaValue) throws IllegalArgumentException
Returns aDuoFactor
fromEdCli.MFA_VALUE_OPTION
command-line arguments.- Parameters:
mfaValue
-EdCli.MFA_VALUE_OPTION
provided- Returns:
DuoFactor
- Throws:
IllegalArgumentException
- IfDuoFactor
cannot be instantiated
-
-