November Happy Hour will be moved to Thursday December 5th.

Interface ISynchronizedUsersRepository

Repository for synchronized users

Namespace: EPiServer.Security.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public interface ISynchronizedUsersRepository

Properties

DefaultSynchronizedClaims

The default synchronized claims, which are Email, GivenName, Surname and role claims

Declaration
IEnumerable<string> DefaultSynchronizedClaims { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

Methods

ClearRolesAsync(String)

Clears all synchronized roles for a user

Declaration
Task ClearRolesAsync(string username)
Parameters
Type Name Description
System.String username

The user to clear roles for

Returns
Type Description
System.Threading.Tasks.Task

The Task that represents the asynchronous operation.

FindRolesAsync(String)

Find all roles that matches the specified string

Declaration
Task<IEnumerable<string>> FindRolesAsync(string partOfName)
Parameters
Type Name Description
System.String partOfName

A string to match roles against

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>>

The Task that represents the asynchronous operation, containing A list of matched roles.

FindUsersAsync(String)

Find all users that matches the specified string

Declaration
Task<IEnumerable<string>> FindUsersAsync(string partOfName)
Parameters
Type Name Description
System.String partOfName

A string to match user against

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>>

The Task that represents the asynchronous operation, containing A list of matched users.

FindUsersInRoleAsync(String, String)

Finds all synchronized users that is part of role

Declaration
Task<IEnumerable<string>> FindUsersInRoleAsync(string roleName, string partOfUsername)
Parameters
Type Name Description
System.String roleName

The role name

System.String partOfUsername

Part of the user name to match, if any

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>>

A list of matched users

GetRolesForUserAsync(String)

Gets all synchronized roles for a user

Declaration
Task<IEnumerable<string>> GetRolesForUserAsync(string username)
Parameters
Type Name Description
System.String username

The user to get roles for

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>>

The Task that represents the asynchronous operation, containing A list of roles.

HideRoleAsync(String)

A synched role can be hidden, meaning it will not be returned from FindRoles.

Declaration
Task HideRoleAsync(string role)
Parameters
Type Name Description
System.String role

The role to hide

Returns
Type Description
System.Threading.Tasks.Task

ListRoleStatusAsync()

List statuses for all synchronized roles

Declaration
Task<IEnumerable<SynchronizedRoleStatus>> ListRoleStatusAsync()
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<SynchronizedRoleStatus>>

A list of statuses for all roles

ShowRoleAsync(String)

Call to show a previously hidden role in FindRoles.

Declaration
Task ShowRoleAsync(string role)
Parameters
Type Name Description
System.String role

The role that should shown.

Returns
Type Description
System.Threading.Tasks.Task

The Task that represents the asynchronous operation

Synchronize(String, String, IEnumerable<Claim>)

Synchronizes an user and claims

Declaration
void Synchronize(string username, string roleClaimType, IEnumerable<Claim> claims)
Parameters
Type Name Description
System.String username

The user to synchronize

System.String roleClaimType

The roleClaimType used to identify role claims

System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims

The claims to synchronize

SynchronizeAsync(String, String, IEnumerable<Claim>)

Synchronizes an user and claims asynchronusly

Declaration
Task SynchronizeAsync(string username, string roleClaimType, IEnumerable<Claim> claims)
Parameters
Type Name Description
System.String username

The user to synchronize

System.String roleClaimType

The roleClaimType used to identify role claims

System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims

The claims to synchronize

Returns
Type Description
System.Threading.Tasks.Task

The Task that represents the asynchronous operation.

Extension Methods