public interface CredentialStore
Store containing the credentials.
This is a standard interface to allow various credential stores to be
utilised as a dependency for HttpSecuritySource
.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ALGORITHM
Default algorithm.
|
static String |
NO_ALGORITHM
Non-blank value indicating no algorithm.
|
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithm()
Obtains the algorithm used to encrypt credentials within this
CredentialStore . |
CredentialEntry |
retrieveCredentialEntry(String userId,
String realm)
Retrieves the
CredentialEntry . |
static final String DEFAULT_ALGORITHM
static final String NO_ALGORITHM
Non-blank value indicating no algorithm.
This is useful for property configurations of ManagedObjectSource
and WorkSource
instances that need to indicate an algorithm (and
can not provide blank values for required properties).
String getAlgorithm()
Obtains the algorithm used to encrypt credentials within this
CredentialStore
.
Should the return be null
, blank or NO_ALGORITHM
then the password is considered to be stored in plain text. This is
however only useful for the BASIC
authentication scheme due
to the nature of the other authentication schemes (such as
DIGEST
).
It is expected that the credentials for DIGEST
will be
stored as the algorithm applied to userId:realm:password
(as
per RFC 2617). This is necessary as the password is never supplied and
therefore for DIGEST
this MUST return an algorithm.
CredentialEntry retrieveCredentialEntry(String userId, String realm) throws IOException
CredentialEntry
.userId
- User identifier.realm
- Realm. May be null
(especially in the case for
Basic
authentication).CredentialEntry
or null
if no
CredentialEntry
exists for parameters.IOException
- If fails to retrieve CredentialEntry
.Copyright © 2005–2016. All rights reserved.