Package org.wildfly.security.sasl.otp
Class OTP
- java.lang.Object
- 
- org.wildfly.security.sasl.otp.OTP
 
- 
 public final class OTP extends Object Constants for the OTP SASL mechanism.- Author:
- Farah Juma
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_SEED_LENGTHstatic intDEFAULT_SEQUENCE_NUMBERstatic charDICTIONARY_DELIMITERstatic intDICTIONARY_SIZEstatic StringDIRECT_OTPDirect OTP format (either hexadecimal or multi-word OTP).static StringEXTstatic StringHEX_RESPONSEstatic StringINIT_HEX_RESPONSEstatic StringINIT_WORD_RESPONSEstatic Predicate<String>MATCH_NEW_PASSWORDA predicate which is true when the given callback type and prompt match the OTP new password callback.static BiPredicate<Class<? extends ChoiceCallback>,String>MATCH_NEW_PASSWORD_FORMAT_CHOICEA predicate which is true when the given callback type and prompt match the OTP new password format type choice callback.static Predicate<String>MATCH_PASSWORDA predicate which is true when the given callback type and prompt match the OTP password callback.static BiPredicate<Class<? extends ChoiceCallback>,String>MATCH_PASSWORD_FORMAT_CHOICEA predicate which is true when the given callback type and prompt match the OTP password format type choice callback.static BiPredicate<Class<? extends ChoiceCallback>,String>MATCH_RESPONSE_CHOICEA predicate which is true when the given callback type and prompt match the OTP response type choice callback.static intMAX_AUTHENTICATION_ID_LENGTHstatic intMAX_AUTHORIZATION_ID_LENGTHstatic intMAX_PASS_PHRASE_LENGTHstatic intMAX_SEED_LENGTHstatic StringMD5static intMIN_PASS_PHRASE_LENGTHstatic intMIN_SEED_LENGTHstatic intMIN_SEQUENCE_NUMBERstatic StringNEW_PASSWORD_FORMAT_TYPE_PROMPTstatic StringNEW_PASSWORD_PROMPTstatic StringOTP_PREFIXstatic StringPASS_PHRASEPass phrase format.static StringPASSWORD_FORMAT_TYPE_PROMPTstatic StringPASSWORD_PROMPTstatic StringRESPONSE_TYPE_PROMPTstatic StringSHA1static StringSHA256static StringSHA384static StringSHA512static StringWORD_RESPONSE
 - 
Constructor SummaryConstructors Constructor Description OTP()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static OneTimePasswordAlgorithmSpecgetOTPParameterSpec(String algorithm, String seed, int sequenceNumber)Get the parameter specification for a one-time password generated using the given algorithm, seed, and sequence number.(package private) static booleanisMatched(Map<String,?> props, boolean query)
 
- 
- 
- 
Field Detail- 
OTP_PREFIXpublic static final String OTP_PREFIX - See Also:
- Constant Field Values
 
 - 
EXTpublic static final String EXT - See Also:
- Constant Field Values
 
 - 
MD5public static final String MD5 - See Also:
- Constant Field Values
 
 - 
SHA1public static final String SHA1 - See Also:
- Constant Field Values
 
 - 
SHA256public static final String SHA256 - See Also:
- Constant Field Values
 
 - 
SHA384public static final String SHA384 - See Also:
- Constant Field Values
 
 - 
SHA512public static final String SHA512 - See Also:
- Constant Field Values
 
 - 
HEX_RESPONSEpublic static final String HEX_RESPONSE - See Also:
- Constant Field Values
 
 - 
WORD_RESPONSEpublic static final String WORD_RESPONSE - See Also:
- Constant Field Values
 
 - 
INIT_HEX_RESPONSEpublic static final String INIT_HEX_RESPONSE - See Also:
- Constant Field Values
 
 - 
INIT_WORD_RESPONSEpublic static final String INIT_WORD_RESPONSE - See Also:
- Constant Field Values
 
 - 
PASS_PHRASEpublic static final String PASS_PHRASE Pass phrase format.- See Also:
- Constant Field Values
 
 - 
DIRECT_OTPpublic static final String DIRECT_OTP Direct OTP format (either hexadecimal or multi-word OTP).- See Also:
- Constant Field Values
 
 - 
MAX_AUTHORIZATION_ID_LENGTHpublic static final int MAX_AUTHORIZATION_ID_LENGTH - See Also:
- Constant Field Values
 
 - 
MAX_AUTHENTICATION_ID_LENGTHpublic static final int MAX_AUTHENTICATION_ID_LENGTH - See Also:
- Constant Field Values
 
 - 
MIN_SEED_LENGTHpublic static final int MIN_SEED_LENGTH - See Also:
- Constant Field Values
 
 - 
MAX_SEED_LENGTHpublic static final int MAX_SEED_LENGTH - See Also:
- Constant Field Values
 
 - 
DEFAULT_SEED_LENGTHpublic static final int DEFAULT_SEED_LENGTH - See Also:
- Constant Field Values
 
 - 
MIN_PASS_PHRASE_LENGTHpublic static final int MIN_PASS_PHRASE_LENGTH - See Also:
- Constant Field Values
 
 - 
MAX_PASS_PHRASE_LENGTHpublic static final int MAX_PASS_PHRASE_LENGTH - See Also:
- Constant Field Values
 
 - 
MIN_SEQUENCE_NUMBERpublic static final int MIN_SEQUENCE_NUMBER - See Also:
- Constant Field Values
 
 - 
DEFAULT_SEQUENCE_NUMBERpublic static final int DEFAULT_SEQUENCE_NUMBER - See Also:
- Constant Field Values
 
 - 
DICTIONARY_DELIMITERpublic static final char DICTIONARY_DELIMITER - See Also:
- Constant Field Values
 
 - 
DICTIONARY_SIZEpublic static final int DICTIONARY_SIZE - See Also:
- Constant Field Values
 
 - 
RESPONSE_TYPE_PROMPTpublic static final String RESPONSE_TYPE_PROMPT - See Also:
- Constant Field Values
 
 - 
PASSWORD_FORMAT_TYPE_PROMPTpublic static final String PASSWORD_FORMAT_TYPE_PROMPT - See Also:
- Constant Field Values
 
 - 
NEW_PASSWORD_FORMAT_TYPE_PROMPTpublic static final String NEW_PASSWORD_FORMAT_TYPE_PROMPT - See Also:
- Constant Field Values
 
 - 
PASSWORD_PROMPTpublic static final String PASSWORD_PROMPT - See Also:
- Constant Field Values
 
 - 
NEW_PASSWORD_PROMPTpublic static final String NEW_PASSWORD_PROMPT - See Also:
- Constant Field Values
 
 - 
MATCH_RESPONSE_CHOICEpublic static final BiPredicate<Class<? extends ChoiceCallback>,String> MATCH_RESPONSE_CHOICE A predicate which is true when the given callback type and prompt match the OTP response type choice callback.
 - 
MATCH_PASSWORD_FORMAT_CHOICEpublic static final BiPredicate<Class<? extends ChoiceCallback>,String> MATCH_PASSWORD_FORMAT_CHOICE A predicate which is true when the given callback type and prompt match the OTP password format type choice callback.
 - 
MATCH_NEW_PASSWORD_FORMAT_CHOICEpublic static final BiPredicate<Class<? extends ChoiceCallback>,String> MATCH_NEW_PASSWORD_FORMAT_CHOICE A predicate which is true when the given callback type and prompt match the OTP new password format type choice callback.
 - 
MATCH_PASSWORDpublic static final Predicate<String> MATCH_PASSWORD A predicate which is true when the given callback type and prompt match the OTP password callback.
 
- 
 - 
Method Detail- 
getOTPParameterSpecpublic static OneTimePasswordAlgorithmSpec getOTPParameterSpec(String algorithm, String seed, int sequenceNumber) Get the parameter specification for a one-time password generated using the given algorithm, seed, and sequence number.- Parameters:
- algorithm- the algorithm
- seed- the seed
- sequenceNumber- the sequence number
- Returns:
- the parameter specification for a one-time password generated using the given algorithm, seed, and sequence number
 
 
- 
 
-