6. Atomia Identity - API Reference

6.1. AddRole

Add specified role.

public void AddRole(
string roleName
)

Parameters:

  • roleName - Name of the role to add.

6.2. AddUser

Adds a new Atomia user to the data source.

public void AddUser(
AtomiaUser user,
string password);

Parameters:

  • user - Atomia user.

  • password - User's password.

6.3. AddUsersToRoles

Adds the users to roles.

public void AddUsersToRoles(
string[] usernames,
string[] roles
)

Parameters:

  • usernames - The usernames.

  • roles - The roles.

6.4. DeleteRole

Delete specified role.

public void DeleteRole(
string roleName
)

Parameters:

  • roleName - Name of the role to delete.

6.5. FindByProperty

Finds Atomia user by certain property.

public AtomiaUser[] FindByProperty(
Dictionary<string, string> atomiaProperty,
bool fillUserProperties
)

Parameters:

  • atomiaProperty - property to search for.

  • fillUserProperties - Indicator to point whether return array of Atomia users will be filled with Atomia user properties.

Return value: Array of Atomia users which has property as the given one.

6.6. FindUsersByEmail

Returns a list of membership users where the email matches the supplied emailPattern .

public AtomiaUser[] FindUsersByEmail(
string emailPattern,
int pageIndex,
int pageSize,
out int totalRecords,
bool fillUserProperties
)

Parameters:

  • emailPattern - The user email pattern to search for. If your data source supports additional search capabilities, such as wildcard characters, you can provide more extensive search capabilities for e-mail addresses.

  • pageIndex - The zero-based index of the page of results to return.

  • pageSize - The size of the page of results to return.

  • totalRecords - The total number of matched users.

  • fillUserProperties - Indicator to point whether return array of Atomia users will be filled with Atomia user properties.

Return value: Collection that contains a page of pageSize AtomiaUser objects beginning at the page specified by pageIndex .

6.7. FindUsersByName

Returns a list of membership users where the user name matches the supplied usernamePattern.

public AtomiaUser[] FindUsersByName(
string usernamePattern,
int pageIndex,
int pageSize,
out int totalRecords,
bool fillUserProperties);

Parameters:

  • usernamePattern - The user name to search for. If your data source supports additional search capabilities, such as wildcard characters, you can provide more extensive search capabilities for user names.

  • pageIndex - The zero-based index of the page of results to return.

  • pageSize - The size of the page of results to return.

  • totalRecords - The total number of matched users.

  • fillUserProperties - Indicator to point whether return array of Atomia users will be filled with Atomia user properties.

Return value: Collection that contains a page of pageSize AtomiaUsers objects beginning at the page specified by pageIndex .

6.8. FindUsersInRole

Returns a list of users in a role where the user name contains a match of the supplied username pattern.

public AtomiaUser[] FindUsersInRole(
string roleName,
string usernamePattern,
bool fillUserProperties
)

Parameters:

  • roleName - The name of the role.

  • usernamePattern - The user name to search for. Wildcard support is included based on the data source.

  • fillUserProperties - Indicator to point whether return array of Atomia users will be filled with Atomia user properties.

Return value: List of users in a role where the user name matches usernamePattern .

6.9. GetAllRoles

Gets all roles.

public string[] GetAllRoles()

Return value: A string array containing the names of all the roles stored.

6.10. GetAllUsers

Returns an array of membership users.

public AtomiaUser[] GetAllUsers(
int pageIndex,
int pageSize,
out int totalRecords,
bool fillUserProperties
)

Parameters:

  • pageIndex - The index of the page of results to return. pageIndex is zero-based.

  • pageSize - The size of the page of results to return.

  • totalRecords - The total number of matched users.

  • fillUserProperties - Indicator to point whether return array of Atomia users will be filled with Atomia user properties.

Return value: Collection that contains a page of pageSize AtomiaUser objects beginning at the page specified by pageIndex .

6.11. GetRolesForUser

Gets a list of the roles that a specified user is.

public string[] GetRolesForUser(
string username
)

Parameters:

  • username - The username of the user that belongs to specific roles.

Return value: List with the roles.

6.12. GetUser

Gets information from the data source for a membership user.

public AtomiaUser GetUser(
string username,
bool fillUserProperties);

Parameters:

  • username - The name of the user to return.

  • fillUserProperties - Indicator to point whether return array of Atomia users will be filled with Atomia user properties.

Return value: Atomia user with user properties.

6.13. GetUserNameByEmail

Returns a list of membership users where the user name matches the supplied username pattern.

public string GetUserNameByEmail(
string email);

Parameters:

  • email - The email address to search for.

Return value: The name of the user.

6.14. GetUsersInRole

Returns all user that belong to specific role.

public AtomiaUser[] GetUsersInRole(
string roleName,
bool fillUserProperties
)

Parameters:

  • roleName - The role of the user.

  • fillUserProperties - Indicator to point whether return array of Atomia users will be filled with Atomia user properties.

Return value: List with the names of all the users who are members of the specified role.

6.15. ModifyAtomiaUser

Modifies Atomia user properties.

public void ModifyAtomiaUser(
AtomiaUser user
)

Parameters:

  • user - Atomia user.

6.16. ModifyPassword

Updates password for the user in the data source.

public void ModifyPassword(
string username,
string oldPassword,
string newPassword);

Parameters:

  • username - Username of the user.

  • oldPassword - Current password for the specified user.

  • newPassword - New password.

6.17. RemoveUser

Deletes user.

public void RemoveUser(
string username
)

Parameters:

  • username - The username of the user to delete.

6.18. RemoveUserFromRole

Removes user from specific role.

public void RemoveUserFromRole(
string[] usernames,
string[] roles
)

Parameters:

  • usernames - A string array of user names to be removed from the specified roles.

  • roles - A string array of role names to remove the specified user names from.

6.19. ValidateUser

Verifies that the specified user name and password exist in the data source.

public bool ValidateUser(
string username,
string password);

Parameters:

  • username - Name of the user to validate.

  • password - Password for the specified user.

Return value: True if username and password are valid, otherwise returns false.