Class AuthorizationExpressionContext
Provides the intercepted message, caller's principal, and other relevant data to an authorization expression.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Security
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class AuthorizationExpressionContext
Constructors
AuthorizationExpressionContext(MessagePipelineContext)
Initializes new instance from the provided message pipeline context.
Declaration
public AuthorizationExpressionContext(MessagePipelineContext context)
Parameters
Type | Name | Description |
---|---|---|
MessagePipelineContext | context | Message pipeline context to be initialized from. |
AuthorizationExpressionContext(Message, ClaimsPrincipal, ServiceConfiguration)
Initializes new instance with provided parameters.
Declaration
public AuthorizationExpressionContext(Message message, ClaimsPrincipal principal, ServiceConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
Message | message | Intercepted message. |
ClaimsPrincipal | principal | Service operation caller's principal. If not provided than principal will be resolved automatically. |
ServiceConfiguration | configuration | Full configuration of the current service. |
Properties
Configuration
Gets the full runtime configuration of the current service.
Declaration
public ServiceConfiguration Configuration { get; }
Property Value
Type | Description |
---|---|
ServiceConfiguration |
Message
Gets or sets the message to be inspected and possibly modified.
Declaration
public Message Message { get; set; }
Property Value
Type | Description |
---|---|
Message |
Principal
Gets the caller's principal that needs to be authorized.
Declaration
public ClaimsPrincipal Principal { get; }
Property Value
Type | Description |
---|---|
ClaimsPrincipal |
TraceWriter
Gets the trace writer to be used for recording expression execution.
Declaration
public ITraceWriter TraceWriter { get; }
Property Value
Type | Description |
---|---|
ITraceWriter |
Methods
GetMessageContent()
Extracts the Message content into a string taking care about empty messages, read messages, and binary encoded messages.
Declaration
public string GetMessageContent()
Returns
Type | Description |
---|---|
String | The message content (including SOAP envelope in SOAP message). |