public class EncryptingCredentialEncoder extends Object implements LDAPCredentialEncoder.LDAPCredentialToStringEncoder
LDAPCredentialEncoder.LDAPCredentialToByteArrayEncoder, LDAPCredentialEncoder.LDAPCredentialToStringEncoder| Constructor and Description |
|---|
EncryptingCredentialEncoder(PasswordEncoderFactory passwordEncoderFactory,
String encryptionAlgorithm) |
| Modifier and Type | Method and Description |
|---|---|
String |
encodeCredential(PasswordCredential passwordCredential)
Given an plain-text password, encodes/encrypts it according to the settings required by the particular directory
connector which this encoder is intended to be used with.
|
String |
getEncryptionAlgorithm() |
PasswordEncoderFactory |
getPasswordEncoderFactory() |
boolean |
supportsSettingEncryptedPasswords() |
public EncryptingCredentialEncoder(PasswordEncoderFactory passwordEncoderFactory, String encryptionAlgorithm)
public String encodeCredential(PasswordCredential passwordCredential) throws InvalidCredentialException
LDAPCredentialEncoderencodeCredential in interface LDAPCredentialEncoderencodeCredential in interface LDAPCredentialEncoder.LDAPCredentialToStringEncoderpasswordCredential - The password credential to be encoded, guanteed to be non-null. If the subclass
supports encrypting the given passwordCredential, it should NOT do so if
PasswordCredential.isEncryptedCredential()
returns true (although it may still encode the credential to the format
required by the directory). The value of
PasswordCredential.getCredential() is also
guaranteed to be non-null.PasswordEncoderNotFoundException - (runtime exception) if the encoder for the
specified encryption method cannot be foundInvalidCredentialException - If the password could not be encoded.LDAPCredentialEncoder.encodeCredential(com.atlassian.crowd.embedded.api.PasswordCredential)public boolean supportsSettingEncryptedPasswords()
supportsSettingEncryptedPasswords in interface LDAPCredentialEncodertrue if the LDAP directory supports client-side encryption of passwords.public PasswordEncoderFactory getPasswordEncoderFactory()
public String getEncryptionAlgorithm()
Copyright © 2023 Atlassian. All rights reserved.