|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cassandra.auth.LegacyAuthenticator
public abstract class LegacyAuthenticator
Provides a transitional IAuthenticator implementation for old-style (pre-1.2) authenticators. Comes with default implementation for the all of the new methods. Subclass LegacyAuthenticator instead of implementing the old IAuthenticator and your old IAuthenticator implementation should continue to work.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.cassandra.auth.IAuthenticator |
|---|
IAuthenticator.Option |
| Field Summary |
|---|
| Fields inherited from interface org.apache.cassandra.auth.IAuthenticator |
|---|
PASSWORD_KEY, USERNAME_KEY |
| Constructor Summary | |
|---|---|
LegacyAuthenticator()
|
|
| Method Summary | |
|---|---|
void |
alter(java.lang.String username,
java.util.Map<IAuthenticator.Option,java.lang.Object> options)
Called during execution of ALTER USER query. |
java.util.Set<IAuthenticator.Option> |
alterableOptions()
Subset of supportedOptions that users are allowed to alter when performing ALTER USER [themselves]. |
abstract AuthenticatedUser |
authenticate(java.util.Map<java.lang.String,java.lang.String> credentials)
Authenticates a user given a Map |
void |
create(java.lang.String username,
java.util.Map<IAuthenticator.Option,java.lang.Object> options)
Called during execution of CREATE USER query (also may be called on startup, see seedSuperuserOptions method). |
abstract AuthenticatedUser |
defaultUser()
|
void |
drop(java.lang.String username)
Called during execution of DROP USER query. |
java.util.Set<IResource> |
protectedResources()
Set of resources that should be made inaccessible to users and only accessible internally. |
boolean |
requireAuthentication()
Whether or not the authenticator requires explicit login. |
void |
setup()
Setup is called once upon system startup to initialize the IAuthenticator. |
java.util.Set<IAuthenticator.Option> |
supportedOptions()
Set of options supported by CREATE USER and ALTER USER queries. |
abstract void |
validateConfiguration()
Validates configuration of IAuthenticator implementation (if configurable). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LegacyAuthenticator()
| Method Detail |
|---|
public abstract AuthenticatedUser defaultUser()
public abstract AuthenticatedUser authenticate(java.util.Map<java.lang.String,java.lang.String> credentials)
throws AuthenticationException
IAuthenticator
authenticate in interface IAuthenticatorcredentials - An implementation specific collection of identifying information.
AuthenticationException - if credentials don't match any known user.
public abstract void validateConfiguration()
throws ConfigurationException
IAuthenticator
validateConfiguration in interface IAuthenticatorConfigurationException - when there is a configuration error.public boolean requireAuthentication()
IAuthenticator
requireAuthentication in interface IAuthenticatorpublic java.util.Set<IAuthenticator.Option> supportedOptions()
IAuthenticator
supportedOptions in interface IAuthenticatorpublic java.util.Set<IAuthenticator.Option> alterableOptions()
IAuthenticator
alterableOptions in interface IAuthenticator
public void create(java.lang.String username,
java.util.Map<IAuthenticator.Option,java.lang.Object> options)
throws InvalidRequestException
IAuthenticator
create in interface IAuthenticatorusername - Username of the user to create.options - Options the user will be created with.
InvalidRequestException
public void alter(java.lang.String username,
java.util.Map<IAuthenticator.Option,java.lang.Object> options)
throws InvalidRequestException
IAuthenticator
alter in interface IAuthenticatorusername - Username of the user that will be altered.options - Options to alter.
InvalidRequestException
public void drop(java.lang.String username)
throws InvalidRequestException
IAuthenticator
drop in interface IAuthenticatorusername - Username of the user that will be dropped.
InvalidRequestExceptionpublic java.util.Set<IResource> protectedResources()
IAuthenticator
protectedResources in interface IAuthenticatorpublic void setup()
IAuthenticator
setup in interface IAuthenticator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||