Package org.apache.zookeeper.server.auth
Class KeyAuthenticationProvider
- java.lang.Object
- 
- org.apache.zookeeper.server.auth.ServerAuthenticationProvider
- 
- org.apache.zookeeper.server.auth.KeyAuthenticationProvider
 
 
- 
- All Implemented Interfaces:
- AuthenticationProvider
 
 public class KeyAuthenticationProvider extends ServerAuthenticationProvider 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.zookeeper.server.auth.ServerAuthenticationProviderServerAuthenticationProvider.MatchValues, ServerAuthenticationProvider.ServerObjs
 
- 
 - 
Constructor SummaryConstructors Constructor Description KeyAuthenticationProvider()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetScheme()The String used to represent this provider.KeeperException.CodehandleAuthentication(ServerAuthenticationProvider.ServerObjs serverObjs, byte[] authData)This method is called when a client passes authentication data for this scheme.booleanisAuthenticated()This method is used to check if the authentication done by this provider should be used to identify the creator of a node.booleanisValid(String id)Validates the syntax of an id.booleanmatches(ServerAuthenticationProvider.ServerObjs serverObjs, ServerAuthenticationProvider.MatchValues matchValues)This method is called to see if the given id matches the given id expression in the ACL.- 
Methods inherited from class org.apache.zookeeper.server.auth.ServerAuthenticationProviderhandleAuthentication, matches
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.zookeeper.server.auth.AuthenticationProvidergetUserName
 
- 
 
- 
- 
- 
Method Detail- 
getSchemepublic String getScheme() Description copied from interface:AuthenticationProviderThe String used to represent this provider. This will correspond to the scheme field of an Id.- Returns:
- the scheme of this provider.
 
 - 
handleAuthenticationpublic KeeperException.Code handleAuthentication(ServerAuthenticationProvider.ServerObjs serverObjs, byte[] authData) Description copied from class:ServerAuthenticationProviderThis method is called when a client passes authentication data for this scheme. The authData is directly from the authentication packet. The implementor may attach new ids to the authInfo field of cnxn or may use cnxn to send packets back to the client.- Specified by:
- handleAuthenticationin class- ServerAuthenticationProvider
- Parameters:
- serverObjs- cnxn/server/etc that received the authentication information.
- authData- the authentication data received.
- Returns:
- indication of success or failure
 
 - 
matchespublic boolean matches(ServerAuthenticationProvider.ServerObjs serverObjs, ServerAuthenticationProvider.MatchValues matchValues) Description copied from class:ServerAuthenticationProviderThis method is called to see if the given id matches the given id expression in the ACL. This allows schemes to use application specific wild cards.- Specified by:
- matchesin class- ServerAuthenticationProvider
- Parameters:
- serverObjs- cnxn/server/etc that received the authentication information.
- matchValues- values to be matched
 
 - 
isAuthenticatedpublic boolean isAuthenticated() Description copied from interface:AuthenticationProviderThis method is used to check if the authentication done by this provider should be used to identify the creator of a node. Some ids such as hosts and ip addresses are rather transient and in general don't really identify a client even though sometimes they do.- Returns:
- true if this provider identifies creators.
 
 - 
isValidpublic boolean isValid(String id) Description copied from interface:AuthenticationProviderValidates the syntax of an id.- Parameters:
- id- the id to validate.
- Returns:
- true if id is well formed.
 
 
- 
 
-