C# Class SecurityControllers.Authorization.ClaimPermission

Inheritance: IPermission, ISecurityEncodable, IUnrestrictedPermission
Afficher le fichier Open project: wcpro/SecurityControllers

Méthodes publiques

Méthode Description
CheckAccess ( string action, string resource ) : bool

Calls ClaimsAuthorizationManager.

ClaimPermission ( string resource, string action ) : System

Initializes a new instance of the ClaimPermission class.

ClaimPermission ( string resourceType, string resource, string actionType, string action ) : System

Initializes a new instance of the ClaimPermission class.

Copy ( ) : IPermission

Creates and returns an identical copy of the current permission.

Demand ( ) : void

Throws a T:System.Security.SecurityException at run time if the security requirement is not met.

FromXml ( SecurityElement e ) : void

Reconstructs a security object with a specified state from an XML encoding.

Intersect ( IPermission target ) : IPermission

Creates and returns a permission that is the intersection of the current permission and the specified permission.

IsSubsetOf ( IPermission target ) : bool

Determines whether the current permission is a subset of the specified permission.

IsUnrestricted ( ) : bool

Returns a value indicating whether unrestricted access to the resource protected by the permission is allowed.

ToXml ( ) : SecurityElement

Creates an XML encoding of the security object and its current state.

Union ( IPermission target ) : IPermission

Creates a permission that is the union of the current permission and the specified permission.

Private Methods

Méthode Description
ClaimPermission ( IEnumerable resourceActions ) : System
CreateAuthorizationContext ( ClaimsPrincipal currentPrincipal, ResourceAction resourceAction ) : System.Security.Claims.AuthorizationContext
ThrowSecurityException ( ) : void

Method Details

CheckAccess() public static méthode

Calls ClaimsAuthorizationManager.
public static CheckAccess ( string action, string resource ) : bool
action string The action.
resource string The resource.
Résultat bool

ClaimPermission() public méthode

Initializes a new instance of the ClaimPermission class.
public ClaimPermission ( string resource, string action ) : System
resource string The resource.
action string The action.
Résultat System

ClaimPermission() public méthode

Initializes a new instance of the ClaimPermission class.
public ClaimPermission ( string resourceType, string resource, string actionType, string action ) : System
resourceType string Type of the resource.
resource string The resource.
actionType string Type of the action.
action string The action.
Résultat System

Copy() public méthode

Creates and returns an identical copy of the current permission.
public Copy ( ) : IPermission
Résultat IPermission

Demand() public méthode

Throws a T:System.Security.SecurityException at run time if the security requirement is not met.
public Demand ( ) : void
Résultat void

FromXml() public méthode

Reconstructs a security object with a specified state from an XML encoding.
public FromXml ( SecurityElement e ) : void
e System.Security.SecurityElement The XML encoding to use to reconstruct the security object.
Résultat void

Intersect() public méthode

Creates and returns a permission that is the intersection of the current permission and the specified permission.
The parameter is not null and is not an instance of the same class as the current permission.
public Intersect ( IPermission target ) : IPermission
target IPermission A permission to intersect with the current permission. It must be of the same type as the current permission.
Résultat IPermission

IsSubsetOf() public méthode

Determines whether the current permission is a subset of the specified permission.
The parameter is not null and is not of the same type as the current permission.
public IsSubsetOf ( IPermission target ) : bool
target IPermission A permission that is to be tested for the subset relationship. This permission must be of the same type as the current permission.
Résultat bool

IsUnrestricted() public méthode

Returns a value indicating whether unrestricted access to the resource protected by the permission is allowed.
public IsUnrestricted ( ) : bool
Résultat bool

ToXml() public méthode

Creates an XML encoding of the security object and its current state.
public ToXml ( ) : SecurityElement
Résultat System.Security.SecurityElement

Union() public méthode

Creates a permission that is the union of the current permission and the specified permission.
The parameter is not null and is not of the same type as the current permission.
public Union ( IPermission target ) : IPermission
target IPermission A permission to combine with the current permission. It must be of the same type as the current permission.
Résultat IPermission