public class DigestAuthenticationProvider extends java.lang.Object implements AuthenticationProvider
| Constructor and Description |
|---|
DigestAuthenticationProvider() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
generateDigest(java.lang.String idPassword) |
java.lang.String |
getScheme()
The String used to represent this provider.
|
KeeperException.Code |
handleAuthentication(ServerCnxn cnxn,
byte[] authData)
This method is called when a client passes authentication data for this
scheme.
|
boolean |
isAuthenticated()
This method is used to check if the authentication done by this provider
should be used to identify the creator of a node.
|
boolean |
isValid(java.lang.String id)
Validates the syntax of an id.
|
static void |
main(java.lang.String[] args)
Call with a single argument of user:pass to generate authdata.
|
boolean |
matches(java.lang.String id,
java.lang.String aclExpr)
This method is called to see if the given id matches the given id
expression in the ACL.
|
public java.lang.String getScheme()
AuthenticationProvidergetScheme in interface AuthenticationProviderpublic static java.lang.String generateDigest(java.lang.String idPassword)
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionpublic KeeperException.Code handleAuthentication(ServerCnxn cnxn, byte[] authData)
AuthenticationProviderhandleAuthentication in interface AuthenticationProvidercnxn - the cnxn that received the authentication information.authData - the authentication data received.public boolean isAuthenticated()
AuthenticationProviderisAuthenticated in interface AuthenticationProviderpublic boolean isValid(java.lang.String id)
AuthenticationProviderisValid in interface AuthenticationProviderid - the id to validate.public boolean matches(java.lang.String id,
java.lang.String aclExpr)
AuthenticationProvidermatches in interface AuthenticationProviderid - the id to check.aclExpr - the expression to match ids against.public static void main(java.lang.String[] args)
throws java.security.NoSuchAlgorithmException
args - single argument of user:passjava.security.NoSuchAlgorithmExceptionCopyright © 2016 The Apache Software Foundation