org.picketlink.idm.file.internal
@CredentialHandlers(value={PasswordCredentialHandler.class,X509CertificateCredentialHandler.class,DigestCredentialHandler.class,TOTPCredentialHandler.class,TokenCredentialHandler.class}) public class FileIdentityStore extends AbstractIdentityStore<FileIdentityStoreConfiguration> implements PartitionStore<FileIdentityStoreConfiguration>, CredentialStore<FileIdentityStoreConfiguration>, AttributeStore<FileIdentityStoreConfiguration>, PermissionStore
File based IdentityStore
implementation.
Constructor and Description |
---|
FileIdentityStore() |
Modifier and Type | Method and Description |
---|---|
void |
add(IdentityContext identityContext,
Partition partition,
String configurationName) |
void |
addAttributedType(IdentityContext context,
AttributedType attributedType) |
<V extends IdentityType> |
fetchQueryResults(IdentityContext context,
IdentityQuery<V> identityQuery) |
<T extends Relationship> |
fetchQueryResults(IdentityContext context,
RelationshipQuery<T> query) |
<P extends Partition> |
get(IdentityContext identityContext,
Class<P> partitionClass) |
<P extends Partition> |
get(IdentityContext identityContext,
Class<P> partitionClass,
String name) |
<V extends Serializable> |
getAttribute(IdentityContext context,
AttributedType type,
String attributeName)
Returns the Attribute value with the specified name, for the specified IdentityType
|
String |
getConfigurationName(IdentityContext identityContext,
Partition partition) |
boolean |
grantPermission(IdentityContext context,
IdentityType assignee,
Object resource,
String operation)
Grants the specified permission
|
List<Permission> |
listPermissions(IdentityContext context,
Class<?> resourceClass,
Serializable identifier)
Returns a List containing all the permissions for a resource that has not yet been loaded,
using the specified resource class and resource identifier value.
|
List<Permission> |
listPermissions(IdentityContext context,
Class<?> resourceClass,
Serializable identifier,
String operation)
Returns a List containing all the permissions for a resource that has not yet been loaded,
using the specified resource class and resource identifier value, with the specified operation.
|
List<Permission> |
listPermissions(IdentityContext context,
IdentityType identityType)
Returns a list of all
Permission for the given IdentityType . |
List<Permission> |
listPermissions(IdentityContext context,
Object resource)
Returns a List value containing all permissions for the specified resource.
|
List<Permission> |
listPermissions(IdentityContext context,
Object resource,
String operation)
Returns a List value containing all permissions for the specified resource, having the specified operation
|
List<Permission> |
listPermissions(IdentityContext context,
Set<Object> resources,
String operation)
Returns a List value containing all permissions for all of the specified resource,
having the specified operation
|
void |
loadAttributes(IdentityContext context,
AttributedType attributedType)
Loads all attributes for the given
AttributedType . |
<P extends Partition> |
lookupById(IdentityContext context,
Class<P> partitionClass,
String id) |
void |
remove(IdentityContext identityContext,
Partition partition) |
void |
removeAttribute(IdentityContext context,
AttributedType type,
String attributeName)
Removes the specified Attribute value, for the specified IdentityType
|
void |
removeAttributedType(IdentityContext context,
AttributedType attributedType) |
void |
removeCredential(IdentityContext context,
Account account,
Class<? extends CredentialStorage> storageClass)
Removes all credentials stored by a certain
CredentialStorage associated
with the given Account . |
protected void |
removeCredentials(IdentityContext context,
Account account) |
protected void |
removeFromRelationships(IdentityContext context,
IdentityType identityType) |
<T extends CredentialStorage> |
retrieveCredentials(IdentityContext context,
Account account,
Class<T> storageClass)
Returns a list of all credential state of the specified
T , for the specified Account . |
<T extends CredentialStorage> |
retrieveCurrentCredential(IdentityContext context,
Account account,
Class<T> storageClass)
Returns the currently active credential state of the specified
T , for the specified Account . |
void |
revokeAllPermissions(IdentityContext context,
Object resource)
Revokes all permissions for the specified resource
|
boolean |
revokePermission(IdentityContext context,
IdentityType assignee,
Object resource,
String operation)
Revokes the specified permission
|
void |
setAttribute(IdentityContext context,
AttributedType type,
Attribute<? extends Serializable> attribute)
Sets the specified Attribute value for the specified IdentityType
|
void |
setup(FileIdentityStoreConfiguration configuration)
Sets the configuration and context in which the IdentityStore will execute its operations
|
void |
storeCredential(IdentityContext context,
Account account,
CredentialStorage storage)
Stores the specified credential state.
|
void |
update(IdentityContext identityContext,
Partition partition) |
void |
updateAttributedType(IdentityContext context,
AttributedType attributedType) |
add, countQueryResults, countQueryResults, getConfig, remove, update, updateCredential, validateCredentials
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, countQueryResults, countQueryResults, getConfig, remove, update, updateCredential, validateCredentials
public void setup(FileIdentityStoreConfiguration configuration)
IdentityStore
setup
in interface IdentityStore<FileIdentityStoreConfiguration>
setup
in class AbstractIdentityStore<FileIdentityStoreConfiguration>
protected void removeFromRelationships(IdentityContext context, IdentityType identityType)
removeFromRelationships
in class AbstractIdentityStore<FileIdentityStoreConfiguration>
protected void removeCredentials(IdentityContext context, Account account)
removeCredentials
in class AbstractIdentityStore<FileIdentityStoreConfiguration>
public void addAttributedType(IdentityContext context, AttributedType attributedType)
addAttributedType
in class AbstractIdentityStore<FileIdentityStoreConfiguration>
public void updateAttributedType(IdentityContext context, AttributedType attributedType)
updateAttributedType
in class AbstractIdentityStore<FileIdentityStoreConfiguration>
public void removeAttributedType(IdentityContext context, AttributedType attributedType)
removeAttributedType
in class AbstractIdentityStore<FileIdentityStoreConfiguration>
public String getConfigurationName(IdentityContext identityContext, Partition partition)
getConfigurationName
in interface PartitionStore<FileIdentityStoreConfiguration>
public <P extends Partition> P get(IdentityContext identityContext, Class<P> partitionClass, String name)
get
in interface PartitionStore<FileIdentityStoreConfiguration>
public <P extends Partition> List<P> get(IdentityContext identityContext, Class<P> partitionClass)
get
in interface PartitionStore<FileIdentityStoreConfiguration>
public <P extends Partition> P lookupById(IdentityContext context, Class<P> partitionClass, String id)
lookupById
in interface PartitionStore<FileIdentityStoreConfiguration>
public void add(IdentityContext identityContext, Partition partition, String configurationName)
add
in interface PartitionStore<FileIdentityStoreConfiguration>
public void update(IdentityContext identityContext, Partition partition)
update
in interface PartitionStore<FileIdentityStoreConfiguration>
public void remove(IdentityContext identityContext, Partition partition)
remove
in interface PartitionStore<FileIdentityStoreConfiguration>
public void storeCredential(IdentityContext context, Account account, CredentialStorage storage)
CredentialStore
storeCredential
in interface CredentialStore<FileIdentityStoreConfiguration>
context
- The contextual invocation context.account
- The account which credentials should be removed.storage
- The credential storage instance to be stored.public <T extends CredentialStorage> T retrieveCurrentCredential(IdentityContext context, Account account, Class<T> storageClass)
CredentialStore
T
, for the specified Account
.retrieveCurrentCredential
in interface CredentialStore<FileIdentityStoreConfiguration>
context
- The contextual invocation context.account
- The account which credentials should be removed.storageClass
- The credential storage type specifying which credential types should be removed.public <T extends CredentialStorage> List<T> retrieveCredentials(IdentityContext context, Account account, Class<T> storageClass)
CredentialStore
T
, for the specified Account
.retrieveCredentials
in interface CredentialStore<FileIdentityStoreConfiguration>
context
- The contextual invocation context.account
- The account which credentials should be removed.storageClass
- The credential storage type specifying which credential types should be removed.public void removeCredential(IdentityContext context, Account account, Class<? extends CredentialStorage> storageClass)
CredentialStore
Removes all credentials stored by a certain CredentialStorage
associated
with the given Account
.
removeCredential
in interface CredentialStore<FileIdentityStoreConfiguration>
context
- The contextual invocation context.account
- The account which credentials should be removed.storageClass
- The credential storage type specifying which credential types should be removed.public <V extends IdentityType> List<V> fetchQueryResults(IdentityContext context, IdentityQuery<V> identityQuery)
fetchQueryResults
in interface IdentityStore<FileIdentityStoreConfiguration>
public <T extends Relationship> List<T> fetchQueryResults(IdentityContext context, RelationshipQuery<T> query)
fetchQueryResults
in interface IdentityStore<FileIdentityStoreConfiguration>
public void setAttribute(IdentityContext context, AttributedType type, Attribute<? extends Serializable> attribute)
AttributeStore
setAttribute
in interface AttributeStore<FileIdentityStoreConfiguration>
public <V extends Serializable> Attribute<V> getAttribute(IdentityContext context, AttributedType type, String attributeName)
AttributeStore
getAttribute
in interface AttributeStore<FileIdentityStoreConfiguration>
public void removeAttribute(IdentityContext context, AttributedType type, String attributeName)
AttributeStore
removeAttribute
in interface AttributeStore<FileIdentityStoreConfiguration>
public void loadAttributes(IdentityContext context, AttributedType attributedType)
AttributeStore
AttributedType
.loadAttributes
in interface AttributeStore<FileIdentityStoreConfiguration>
public List<Permission> listPermissions(IdentityContext context, Object resource)
PermissionStore
listPermissions
in interface PermissionStore
public List<Permission> listPermissions(IdentityContext context, IdentityType identityType)
PermissionStore
Returns a list of all Permission
for the given IdentityType
.
listPermissions
in interface PermissionStore
public List<Permission> listPermissions(IdentityContext context, Object resource, String operation)
PermissionStore
listPermissions
in interface PermissionStore
public List<Permission> listPermissions(IdentityContext context, Set<Object> resources, String operation)
PermissionStore
listPermissions
in interface PermissionStore
public List<Permission> listPermissions(IdentityContext context, Class<?> resourceClass, Serializable identifier)
PermissionStore
listPermissions
in interface PermissionStore
public List<Permission> listPermissions(IdentityContext context, Class<?> resourceClass, Serializable identifier, String operation)
PermissionStore
listPermissions
in interface PermissionStore
public boolean grantPermission(IdentityContext context, IdentityType assignee, Object resource, String operation)
PermissionStore
grantPermission
in interface PermissionStore
public boolean revokePermission(IdentityContext context, IdentityType assignee, Object resource, String operation)
PermissionStore
revokePermission
in interface PermissionStore
public void revokeAllPermissions(IdentityContext context, Object resource)
PermissionStore
revokeAllPermissions
in interface PermissionStore
Copyright © 2016 JBoss by Red Hat. All rights reserved.