public class Repo extends IdRepo
Modifier and Type | Field and Description |
---|---|
com.datastax.oss.driver.api.core.CqlSession |
session |
Constructor and Description |
---|
Repo() |
Modifier and Type | Method and Description |
---|---|
int |
addListener(SSOToken token,
IdRepoListener listener)
Adds a listener for changes in the repository
|
void |
assignService(SSOToken token,
IdType type,
String name,
String serviceName,
SchemaType stype,
Map<String,Set<String>> attrMap)
This method is used to assign a service to the given identity.
|
boolean |
authenticate(Callback[] credentials)
Returns
true if the data store successfully authenticates
the identity with the provided credentials. |
String |
create(SSOToken token,
IdType type,
String name,
Map<String,Set<String>> attrMap)
Creates an identity.
|
void |
delete(SSOToken token,
IdType type,
String name)
Deletes an identity.
|
Set<String> |
getAssignedServices(SSOToken token,
IdType type,
String name,
Map<String,Set<String>> mapOfServicesAndOCs)
Returns the set of services assigned to this identity.
|
Map<String,Set<String>> |
getAttributes(SSOToken token,
IdType type,
String name)
Returns all attributes and values of name object
|
Map<String,Set<String>> |
getAttributes(SSOToken token,
IdType type,
String name,
Set<String> attrNames)
Returns requested attributes and values of name object.
|
Map<String,byte[][]> |
getBinaryAttributes(SSOToken token,
IdType type,
String name,
Set<String> attrNames)
Returns requested binary attributes as an array of bytes.
|
Map<String,byte[][]> |
getBinaryServiceAttributes(SSOToken token,
IdType type,
String name,
String serviceName,
Set<String> attrNames)
Returns the requested binary attribute values of the service attributes
as an array of bytes.
|
Set<String> |
getMembers(SSOToken token,
IdType type,
String name,
IdType membersType)
Returns the memberships of an identity.
|
Set<String> |
getMemberships(SSOToken token,
IdType type,
String name,
IdType membershipType)
Returns the memberships of an identity.
|
Map<String,Set<String>> |
getServiceAttributes(SSOToken token,
IdType type,
String name,
String serviceName,
Set<String> attrNames)
Returns the attribute values of the service attributes.
|
Set<IdOperation> |
getSupportedOperations(IdType type)
Return supported operations for a given IdType
|
Set<IdType> |
getSupportedTypes() |
void |
initialize(Map<String,Set<String>> configParams)
Initialization paramters as configred for a given plugin.
|
boolean |
isActive(SSOToken token,
IdType type,
String name)
Returns true if the
name object is active. |
boolean |
isExists(SSOToken token,
IdType type,
String name)
Returns true if the
name object exists in the data store. |
void |
modifyMemberShip(SSOToken token,
IdType type,
String name,
Set<String> members,
IdType membersType,
int operation)
Modify membership of the identity.
|
void |
modifyService(SSOToken token,
IdType type,
String name,
String serviceName,
SchemaType sType,
Map<String,Set<String>> attrMap)
Modifies the attribute values of the service attributes.
|
void |
removeAttributes(SSOToken token,
IdType type,
String name,
Set<String> attrNames)
Removes the attributes from the identity.
|
void |
removeListener()
Removes the listener added using
addListener method. |
RepoSearchResults |
search(SSOToken token,
IdType type,
CrestQuery crestQuery,
int maxTime,
int maxResults,
Set<String> returnAttrs,
boolean returnAllAttrs,
int filterOp,
Map<String,Set<String>> avPairs,
boolean recursive)
Search for specific type of identities using a CrestQuery object instead of a string.
|
RepoSearchResults |
search(SSOToken token,
IdType type,
String pattern,
int maxTime,
int maxResults,
Set<String> returnAttrs,
boolean returnAllAttrs,
int filterOp,
Map<String,Set<String>> avPairs,
boolean recursive) |
void |
setActiveStatus(SSOToken token,
IdType type,
String name,
boolean active)
Sets the object's status to
active . |
void |
setAttributes(SSOToken token,
IdType type,
String name,
Map<String,Set<String>> attributes_in,
boolean isAdd)
Set the values of attributes of the identity.
|
void |
setBinaryAttributes(SSOToken token,
IdType type,
String name,
Map<String,byte[][]> attributes,
boolean isAdd)
Set the values of binary attributes the identity.
|
void |
shutdown()
This method is invoked just before the plugin is removed from the IdRepo
cache of plugins.
|
boolean |
supportsAuthentication()
Returns
true if the data store supports authentication of
identities. |
void |
unassignService(SSOToken token,
IdType type,
String name,
String serviceName,
Map<String,Set<String>> attrMap)
If the service is already assigned to the identity then
this method unassigns the service and removes the related
attributes from the entry.
|
changePassword, getConfiguration, getFullyQualifiedName
public void initialize(Map<String,Set<String>> configParams) throws IdRepoException
IdRepo
initialize
in class IdRepo
IdRepoException
public void shutdown()
IdRepo
public Set<IdOperation> getSupportedOperations(IdType type)
IdRepo
getSupportedOperations
in class IdRepo
type
- Identity typepublic Set<IdType> getSupportedTypes()
getSupportedTypes
in class IdRepo
public boolean isExists(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
IdRepo
name
object exists in the data store.isExists
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.true
if name object is in data store
else false
IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public boolean isActive(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
IdRepo
name
object is active.isActive
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.true
if name object is in active
else false
IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void setActiveStatus(SSOToken token, IdType type, String name, boolean active) throws IdRepoException, SSOException
IdRepo
active
.setActiveStatus
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.active
- true if setting to active; false otherwise.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Map<String,Set<String>> getAttributes(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
IdRepo
getAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Map<String,Set<String>> getAttributes(SSOToken token, IdType type, String name, Set<String> attrNames) throws IdRepoException, SSOException
IdRepo
getAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrNames
- Set of attribute names to be readIdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Map<String,byte[][]> getBinaryAttributes(SSOToken token, IdType type, String name, Set<String> attrNames) throws IdRepoException, SSOException
IdRepo
getBinaryAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrNames
- Set of attribute names to be readIdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public String create(SSOToken token, IdType type, String name, Map<String,Set<String>> attrMap) throws IdRepoException, SSOException
IdRepo
create
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrMap
- Map of attribute-values assoicated with this object.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void delete(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
IdRepo
delete
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void setAttributes(SSOToken token, IdType type, String name, Map<String,Set<String>> attributes_in, boolean isAdd) throws IdRepoException, SSOException
IdRepo
setAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attributes_in
- Map of attribute-values to set or add.isAdd
- if true
add the attribute-values; otherwise
replaces the attribute-values.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void setBinaryAttributes(SSOToken token, IdType type, String name, Map<String,byte[][]> attributes, boolean isAdd) throws IdRepoException, SSOException
IdRepo
setBinaryAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attributes
- Map of binary attribute-values to set or add.isAdd
- if true
add the attribute-values; otherwise
replaces the attribute-values.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void removeAttributes(SSOToken token, IdType type, String name, Set<String> attrNames) throws IdRepoException, SSOException
IdRepo
removeAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrNames
- Set of attribute names to remove.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public RepoSearchResults search(SSOToken token, IdType type, CrestQuery crestQuery, int maxTime, int maxResults, Set<String> returnAttrs, boolean returnAllAttrs, int filterOp, Map<String,Set<String>> avPairs, boolean recursive) throws SSOException, IdRepoException
IdRepo
search
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.crestQuery
- pattern to search for, of type CrestQuery
.maxTime
- maximum wait time for search.maxResults
- maximum records to return.returnAttrs
- Set of attribute names to return.returnAllAttrs
- return all attributesfilterOp
- filter condition.avPairs
- additional search conditions.SSOException
- If identity's single sign on token is invalid.IdRepoException
- If there are repository related error conditions.public RepoSearchResults search(SSOToken token, IdType type, String pattern, int maxTime, int maxResults, Set<String> returnAttrs, boolean returnAllAttrs, int filterOp, Map<String,Set<String>> avPairs, boolean recursive) throws IdRepoException, SSOException
IdRepoException
SSOException
public void modifyMemberShip(SSOToken token, IdType type, String name, Set<String> members, IdType membersType, int operation) throws IdRepoException, SSOException
IdRepo
modifyMemberShip
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.members
- Set of names to be added as members of namemembersType
- IdType of members.operation
- operations to perform on members ADDMEMBER or REMOVEMEMBER.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Set<String> getMembers(SSOToken token, IdType type, String name, IdType membersType) throws IdRepoException, SSOException
IdRepo
getMembers
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.membersType
- IdType of members of name object.name
IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Set<String> getMemberships(SSOToken token, IdType type, String name, IdType membershipType) throws IdRepoException, SSOException
IdRepo
getMemberships
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.membershipType
- IdType of memberships to return.name
is a member of.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void assignService(SSOToken token, IdType type, String name, String serviceName, SchemaType stype, Map<String,Set<String>> attrMap) throws IdRepoException, SSOException
IdRepo
assignService
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- service to assignattrMap
- Map of attribute-values.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Set<String> getAssignedServices(SSOToken token, IdType type, String name, Map<String,Set<String>> mapOfServicesAndOCs) throws IdRepoException, SSOException
IdRepo
getAssignedServices
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.name
IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void unassignService(SSOToken token, IdType type, String name, String serviceName, Map<String,Set<String>> attrMap) throws IdRepoException, SSOException
IdRepo
unassignService
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Service name to remove.attrMap
- Map of attribute-values to removeIdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Map<String,Set<String>> getServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set<String> attrNames) throws IdRepoException, SSOException
IdRepo
getServiceAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Name of service.attrNames
- Set of attribute names.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Map<String,byte[][]> getBinaryServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set<String> attrNames) throws IdRepoException, SSOException
IdRepo
getBinaryServiceAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Name of service.attrNames
- Set of attribute names.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void modifyService(SSOToken token, IdType type, String name, String serviceName, SchemaType sType, Map<String,Set<String>> attrMap) throws IdRepoException, SSOException
IdRepo
modifyService
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Name of service.attrMap
- map of attribute-values.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public int addListener(SSOToken token, IdRepoListener listener) throws IdRepoException, SSOException
IdRepo
addListener
in class IdRepo
token
- Single sign on token of identity performing the task.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void removeListener()
IdRepo
addListener
method. This
is called by the IdRepo framework when the plugin is being shutdown due
to configuration change, so that a new instance can be created with the
new configuration map.removeListener
in class IdRepo
public boolean supportsAuthentication()
IdRepo
true
if the data store supports authentication of
identities. Used by IdRepo framework to authenticate identities.supportsAuthentication
in class IdRepo
true
if data store supports authentication of of
identities; else false
public boolean authenticate(Callback[] credentials) throws IdRepoException, AuthLoginException
IdRepo
true
if the data store successfully authenticates
the identity with the provided credentials. In case the data store
requires additional credentials, the list would be returned via the
IdRepoException
exception.authenticate
in class IdRepo
credentials
- Array of callback objects containing information such as
username and password.true
if data store authenticates the identity;
else false
IdRepoException
AuthLoginException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.