public class CredentialStoreUtil extends Object
CredentialStore
.Modifier and Type | Method and Description |
---|---|
static HttpSecurity |
authenticate(String userId,
String realm,
byte[] credentials,
String scheme,
CredentialStore store)
Convenience method to authenticate the user from the
CredentialStore . |
static MessageDigest |
createDigest(String algorithm)
Creates the
MessageDigest for the CredentialStore
algorithm. |
public static MessageDigest createDigest(String algorithm) throws IOException
MessageDigest
for the CredentialStore
algorithm.algorithm
- CredentialStore
algorithm.MessageDigest
for the algorithm or null
indicate credentials are in plain text.IOException
- If fails to obtain MessageDigest
for the algorithm.public static HttpSecurity authenticate(String userId, String realm, byte[] credentials, String scheme, CredentialStore store) throws IOException
CredentialStore
.userId
- Identifier for the user.realm
- Security realm.credentials
- Credentials.scheme
- Authentication scheme.store
- CredentialStore
.HttpSecurity
or null
if not authorised.IOException
- If fails to communicate with CredentialStore
.Copyright © 2005–2016. All rights reserved.