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 int
DEFAULT_SEED_LENGTH
static int
DEFAULT_SEQUENCE_NUMBER
static char
DICTIONARY_DELIMITER
static int
DICTIONARY_SIZE
static String
DIRECT_OTP
Direct OTP format (either hexadecimal or multi-word OTP).static String
EXT
static String
HEX_RESPONSE
static String
INIT_HEX_RESPONSE
static String
INIT_WORD_RESPONSE
static Predicate<String>
MATCH_NEW_PASSWORD
A 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_CHOICE
A predicate which is true when the given callback type and prompt match the OTP new password format type choice callback.static Predicate<String>
MATCH_PASSWORD
A 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_CHOICE
A 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_CHOICE
A predicate which is true when the given callback type and prompt match the OTP response type choice callback.static int
MAX_AUTHENTICATION_ID_LENGTH
static int
MAX_AUTHORIZATION_ID_LENGTH
static int
MAX_PASS_PHRASE_LENGTH
static int
MAX_SEED_LENGTH
static String
MD5
static int
MIN_PASS_PHRASE_LENGTH
static int
MIN_SEED_LENGTH
static int
MIN_SEQUENCE_NUMBER
static String
NEW_PASSWORD_FORMAT_TYPE_PROMPT
static String
NEW_PASSWORD_PROMPT
static String
OTP_PREFIX
static String
PASS_PHRASE
Pass phrase format.static String
PASSWORD_FORMAT_TYPE_PROMPT
static String
PASSWORD_PROMPT
static String
RESPONSE_TYPE_PROMPT
static String
SHA1
static String
SHA256
static String
SHA384
static String
SHA512
static String
WORD_RESPONSE
-
Constructor Summary
Constructors Constructor Description OTP()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.(package private) static boolean
isMatched(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
-
-