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 Summary
Fields 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 Summary
Constructors Constructor Description OTP()
-
Method Summary
All 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_PREFIX
public static final String OTP_PREFIX
- See Also:
- Constant Field Values
-
EXT
public static final String EXT
- See Also:
- Constant Field Values
-
MD5
public static final String MD5
- See Also:
- Constant Field Values
-
SHA1
public static final String SHA1
- See Also:
- Constant Field Values
-
SHA256
public static final String SHA256
- See Also:
- Constant Field Values
-
SHA384
public static final String SHA384
- See Also:
- Constant Field Values
-
SHA512
public static final String SHA512
- See Also:
- Constant Field Values
-
HEX_RESPONSE
public static final String HEX_RESPONSE
- See Also:
- Constant Field Values
-
WORD_RESPONSE
public static final String WORD_RESPONSE
- See Also:
- Constant Field Values
-
INIT_HEX_RESPONSE
public static final String INIT_HEX_RESPONSE
- See Also:
- Constant Field Values
-
INIT_WORD_RESPONSE
public static final String INIT_WORD_RESPONSE
- See Also:
- Constant Field Values
-
PASS_PHRASE
public static final String PASS_PHRASE
Pass phrase format.- See Also:
- Constant Field Values
-
DIRECT_OTP
public static final String DIRECT_OTP
Direct OTP format (either hexadecimal or multi-word OTP).- See Also:
- Constant Field Values
-
MAX_AUTHORIZATION_ID_LENGTH
public static final int MAX_AUTHORIZATION_ID_LENGTH
- See Also:
- Constant Field Values
-
MAX_AUTHENTICATION_ID_LENGTH
public static final int MAX_AUTHENTICATION_ID_LENGTH
- See Also:
- Constant Field Values
-
MIN_SEED_LENGTH
public static final int MIN_SEED_LENGTH
- See Also:
- Constant Field Values
-
MAX_SEED_LENGTH
public static final int MAX_SEED_LENGTH
- See Also:
- Constant Field Values
-
DEFAULT_SEED_LENGTH
public static final int DEFAULT_SEED_LENGTH
- See Also:
- Constant Field Values
-
MIN_PASS_PHRASE_LENGTH
public static final int MIN_PASS_PHRASE_LENGTH
- See Also:
- Constant Field Values
-
MAX_PASS_PHRASE_LENGTH
public static final int MAX_PASS_PHRASE_LENGTH
- See Also:
- Constant Field Values
-
MIN_SEQUENCE_NUMBER
public static final int MIN_SEQUENCE_NUMBER
- See Also:
- Constant Field Values
-
DEFAULT_SEQUENCE_NUMBER
public static final int DEFAULT_SEQUENCE_NUMBER
- See Also:
- Constant Field Values
-
DICTIONARY_DELIMITER
public static final char DICTIONARY_DELIMITER
- See Also:
- Constant Field Values
-
DICTIONARY_SIZE
public static final int DICTIONARY_SIZE
- See Also:
- Constant Field Values
-
RESPONSE_TYPE_PROMPT
public static final String RESPONSE_TYPE_PROMPT
- See Also:
- Constant Field Values
-
PASSWORD_FORMAT_TYPE_PROMPT
public static final String PASSWORD_FORMAT_TYPE_PROMPT
- See Also:
- Constant Field Values
-
NEW_PASSWORD_FORMAT_TYPE_PROMPT
public static final String NEW_PASSWORD_FORMAT_TYPE_PROMPT
- See Also:
- Constant Field Values
-
PASSWORD_PROMPT
public static final String PASSWORD_PROMPT
- See Also:
- Constant Field Values
-
NEW_PASSWORD_PROMPT
public static final String NEW_PASSWORD_PROMPT
- See Also:
- Constant Field Values
-
MATCH_RESPONSE_CHOICE
public 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_CHOICE
public 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_CHOICE
public 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_PASSWORD
public 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
-
getOTPParameterSpec
public 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 algorithmseed- the seedsequenceNumber- the sequence number- Returns:
- the parameter specification for a one-time password generated using the given algorithm, seed, and sequence number
-
-