Class AuthorizationContext
An authorization context.
Inheritance
Implements
Inherited Members
Namespace: Kephas.Security.Authorization
Assembly: Kephas.Core.dll
Syntax
public class AuthorizationContext : Context, IAuthorizationContext, IContext, IExpando, IDynamicMetaObjectProvider, IIndexable, ILoggable, IDisposable
Constructors
| Improve this Doc View SourceAuthorizationContext(IContext, IEnumerable<String>, IEnumerable<Type>, Object)
Initializes a new instance of the AuthorizationContext class.
Declaration
public AuthorizationContext(IContext executingContext, IEnumerable<string> requiredPermissions, IEnumerable<Type> requiredPermissionTypes, object scope = null)
Parameters
Type | Name | Description |
---|---|---|
IContext | executingContext | Context for the executing. |
System.Collections.Generic.IEnumerable<System.String> | requiredPermissions | The required permissions. |
System.Collections.Generic.IEnumerable<System.Type> | requiredPermissionTypes | The required permission types. |
System.Object | scope | Optional. The authorization scope. |
AuthorizationContext(IContext, IEnumerable<String>, Object)
Initializes a new instance of the AuthorizationContext class.
Declaration
public AuthorizationContext(IContext executingContext, IEnumerable<string> requiredPermissions, object scope = null)
Parameters
Type | Name | Description |
---|---|---|
IContext | executingContext | Context for the executing. |
System.Collections.Generic.IEnumerable<System.String> | requiredPermissions | A variable-length parameters list containing required permissions. |
System.Object | scope | Optional. The authorization scope. |
AuthorizationContext(IContext, IEnumerable<Type>, Object)
Initializes a new instance of the AuthorizationContext class.
Declaration
public AuthorizationContext(IContext executingContext, IEnumerable<Type> requiredPermissions, object scope = null)
Parameters
Type | Name | Description |
---|---|---|
IContext | executingContext | Context for the executing. |
System.Collections.Generic.IEnumerable<System.Type> | requiredPermissions | A variable-length parameters list containing required permissions. |
System.Object | scope | Optional. The authorization scope. |
AuthorizationContext(IContext, Object)
Initializes a new instance of the AuthorizationContext class.
Declaration
public AuthorizationContext(IContext executingContext, object scope)
Parameters
Type | Name | Description |
---|---|---|
IContext | executingContext | Context for the executing. |
System.Object | scope | The authorization scope. |
AuthorizationContext(IContext, String[])
Initializes a new instance of the AuthorizationContext class.
Declaration
public AuthorizationContext(IContext executingContext, params string[] requiredPermissions)
Parameters
Type | Name | Description |
---|---|---|
IContext | executingContext | Context for the executing. |
System.String[] | requiredPermissions | A variable-length parameters list containing required permissions. |
AuthorizationContext(IContext, Type[])
Initializes a new instance of the AuthorizationContext class.
Declaration
public AuthorizationContext(IContext executingContext, params Type[] requiredPermissions)
Parameters
Type | Name | Description |
---|---|---|
IContext | executingContext | Context for the executing. |
System.Type[] | requiredPermissions | A variable-length parameters list containing required permissions. |
Properties
| Improve this Doc View SourceRequiredPermissions
Gets the required permissions.
Declaration
public IEnumerable<string> RequiredPermissions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | The required permissions. |
RequiredPermissionTypes
Gets the types of the required permissions.
Declaration
public IEnumerable<Type> RequiredPermissionTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Type> | The types of the required permissions. |
Scope
Gets or sets the authorization scope.
Declaration
public object Scope { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The scope. |
ThrowOnFailure
Gets or sets a value indicating whether to throw on failure.
Declaration
public bool ThrowOnFailure { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if throw on failure, false if not. |