Table of Contents

Interface IAuthorisation

Namespace
The.Security
Assembly
Instagile.dll

Implemented by plugins to provide an access control policy.

public interface IAuthorisation

Properties

IsAuthoritative

If true, roles can be determined without async access to a remote server.

bool IsAuthoritative { get; }

Property Value

bool

Remarks

May depend on ambient state - don't cache the result.

Methods

GetDefaultPermissions(CallbackEnvironment)

The rights assigned to all users regardless of their roles.

PermissionSet GetDefaultPermissions(CallbackEnvironment environment)

Parameters

environment CallbackEnvironment

Returns

PermissionSet

GetDefaultPermissions(CallbackEnvironment, EntityMetadataDictionary)

The rights assigned to all users regardless of their roles. Called by the framework in preference to GetDefaultPermissions(CallbackEnvironment), which it falls back to.

PermissionSet GetDefaultPermissions(CallbackEnvironment environment, EntityMetadataDictionary metadata)

Parameters

environment CallbackEnvironment
metadata EntityMetadataDictionary

Returns

PermissionSet

GetIdentityRoles(CallbackEnvironment, Identity)

The roles assigned to a user. Available synchronously only if IsAuthoritative returns true.

IReadOnlySet<Role> GetIdentityRoles(CallbackEnvironment environment, Identity subject)

Parameters

environment CallbackEnvironment
subject Identity

Returns

IReadOnlySet<Role>

GetIdentityRolesAsync(CallbackEnvironment, IEntityContext, Identity)

The roles assigned to a user.

Task<IReadOnlySet<Role>> GetIdentityRolesAsync(CallbackEnvironment environment, IEntityContext scopedContext, Identity subject)

Parameters

environment CallbackEnvironment
scopedContext IEntityContext
subject Identity

Returns

Task<IReadOnlySet<Role>>

GetRoleCatalogue(CallbackEnvironment)

The roles supported by this policy in declaration order, or null if there isn't a fixed set.

IReadOnlyList<ClaimsRole>? GetRoleCatalogue(CallbackEnvironment environment)

Parameters

environment CallbackEnvironment

Returns

IReadOnlyList<ClaimsRole>

GetRoleCatalogue(CallbackEnvironment, EntityMetadataDictionary)

The roles supported by this policy in declaration order, or null if there isn't a fixed set. Called by the framework in preference to GetRoleCatalogue(CallbackEnvironment), which it falls back to.

IReadOnlyList<ClaimsRole>? GetRoleCatalogue(CallbackEnvironment environment, EntityMetadataDictionary metadata)

Parameters

environment CallbackEnvironment
metadata EntityMetadataDictionary

Returns

IReadOnlyList<ClaimsRole>

GetRolePermissions(CallbackEnvironment, EntityMetadataDictionary, Role)

The rights assigned to a role (which may be in turn be assigned to users or groups). Called by the framework in preference to GetRolePermissions(CallbackEnvironment, Role), which it falls back to.

PermissionSet GetRolePermissions(CallbackEnvironment environment, EntityMetadataDictionary metadata, Role role)

Parameters

environment CallbackEnvironment
metadata EntityMetadataDictionary
role Role

Returns

PermissionSet

GetRolePermissions(CallbackEnvironment, Role)

The rights assigned to a role (which may be in turn be assigned to users or groups).

PermissionSet GetRolePermissions(CallbackEnvironment environment, Role role)

Parameters

environment CallbackEnvironment
role Role

Returns

PermissionSet