public class DefaultCredentialsMatcher extends Object implements CredentialsContainer.CredentialsMatcher
CredentialsContainer.CredentialsMatcher implementation that employs best-practices and common behaviours to perform
credentials validation and matching.| Constructor and Description |
|---|
DefaultCredentialsMatcher() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
credentialsMatch(CredentialsContainer provided,
CredentialsContainer stored)
Check if provided credentials match the given stored credentials
|
static byte[] |
toBytes(Object o)
Try to convert the given Object into a byte array.
|
public boolean credentialsMatch(CredentialsContainer provided, CredentialsContainer stored) throws AuthenticationException
CredentialsContainer.CredentialsMatchercredentialsMatch in interface CredentialsContainer.CredentialsMatcherprovided - Provided credentialsstored - Stored credentials to matchtrue if the provided credentials match the stored credentials, false
otherwise.AuthenticationException - Error during credentials match (e.g. invalid or unknown credentials)public static byte[] toBytes(Object o)
Supported inputs are byte[], char[], String, InputStream and
File. Otherwise, an IllegalArgumentException will be thrown.
o - the Object to convert into a byte arrayCopyright © 2019 The Holon Platform. All rights reserved.