@NotThreadSafe public class InMemoryAuthorizationPlugin extends Object implements AuthorizationPlugin
AuthorizationPlugin.| Constructor and Description |
|---|
InMemoryAuthorizationPlugin() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
authorized(EntityId entity,
String user,
Set<Action> actions)
Checks if a user is allowed to perform a set of actions on an entity.
|
void |
grant(EntityId entity,
String user)
Grants a user permission to perform all actions on an entity.
|
void |
grant(EntityId entity,
String user,
Set<Action> actions)
Grants a user permission to perform a set of actions on an entity.
|
void |
revoke(EntityId entity)
Revokes all user's permissions on an entity.
|
void |
revoke(EntityId entity,
String user)
Revokes a user's permission on an entity.
|
void |
revoke(EntityId entity,
String user,
Set<Action> actions)
Revokes a user's permission to perform a set of actions on an entity.
|
public boolean authorized(EntityId entity, String user, Set<Action> actions)
AuthorizationPluginauthorized in interface AuthorizationPluginentity - the entityuser - the useractions - the actionspublic void grant(EntityId entity, String user, Set<Action> actions)
AuthorizationPlugingrant in interface AuthorizationPluginentity - the entityuser - the useractions - the actionspublic void grant(EntityId entity, String user)
AuthorizationPlugingrant in interface AuthorizationPluginentity - the entityuser - the userpublic void revoke(EntityId entity, String user, Set<Action> actions)
AuthorizationPluginrevoke in interface AuthorizationPluginentity - the entityuser - the useractions - the actionspublic void revoke(EntityId entity, String user)
AuthorizationPluginrevoke in interface AuthorizationPluginentity - the entityuser - the userpublic void revoke(EntityId entity)
AuthorizationPluginrevoke in interface AuthorizationPluginentity - the entityCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.