Class PasswordDigestObtainer
- java.lang.Object
-
- org.wildfly.security.mechanism.digest.PasswordDigestObtainer
-
public class PasswordDigestObtainer extends Object
Utility class used to obtain username+realm+password using SASL/HTTP mechanism callbacks- Author:
- Jan Kalina
-
-
Field Summary
Fields Modifier and Type Field Description private CallbackHandler
callbackHandler
private String
credentialAlgorithm
private ElytronMessages
log
private MessageDigest
messageDigest
private NameCallback
nameCallback
private Supplier<Provider[]>
passwordFactoryProviders
private boolean
readOnlyRealmUsername
private String
realm
private RealmCallback
realmCallback
private RealmChoiceCallback
realmChoiceCallBack
private String[]
realms
private boolean
skipRealmCallbacks
private String
username
-
Constructor Summary
Constructors Constructor Description PasswordDigestObtainer(CallbackHandler callbackHandler, String defaultUsername, String defaultRealm, ElytronMessages log, String credentialAlgorithm, MessageDigest messageDigest, Supplier<Provider[]> passwordFactoryProviders, String[] realms, boolean readOnlyRealmUsername, boolean skipRealmCallbacks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private byte[]
getPredigestedSaltedPassword()
String
getRealm()
private byte[]
getSaltedPasswordFromPasswordCallback()
private byte[]
getSaltedPasswordFromTwoWay()
String
getUsername()
byte[]
handleUserRealmPasswordCallbacks()
-
-
-
Field Detail
-
callbackHandler
private final CallbackHandler callbackHandler
-
log
private final ElytronMessages log
-
credentialAlgorithm
private final String credentialAlgorithm
-
messageDigest
private final MessageDigest messageDigest
-
realms
private final String[] realms
-
readOnlyRealmUsername
private final boolean readOnlyRealmUsername
-
skipRealmCallbacks
private final boolean skipRealmCallbacks
-
username
private String username
-
realm
private String realm
-
realmChoiceCallBack
private RealmChoiceCallback realmChoiceCallBack
-
realmCallback
private RealmCallback realmCallback
-
nameCallback
private NameCallback nameCallback
-
-
Constructor Detail
-
PasswordDigestObtainer
public PasswordDigestObtainer(CallbackHandler callbackHandler, String defaultUsername, String defaultRealm, ElytronMessages log, String credentialAlgorithm, MessageDigest messageDigest, Supplier<Provider[]> passwordFactoryProviders, String[] realms, boolean readOnlyRealmUsername, boolean skipRealmCallbacks)
-
-
Method Detail
-
getUsername
public String getUsername()
-
getRealm
public String getRealm()
-
handleUserRealmPasswordCallbacks
public byte[] handleUserRealmPasswordCallbacks() throws AuthenticationMechanismException
- Throws:
AuthenticationMechanismException
-
getPredigestedSaltedPassword
private byte[] getPredigestedSaltedPassword() throws AuthenticationMechanismException
- Throws:
AuthenticationMechanismException
-
getSaltedPasswordFromTwoWay
private byte[] getSaltedPasswordFromTwoWay() throws AuthenticationMechanismException
- Throws:
AuthenticationMechanismException
-
getSaltedPasswordFromPasswordCallback
private byte[] getSaltedPasswordFromPasswordCallback() throws AuthenticationMechanismException
- Throws:
AuthenticationMechanismException
-
-