I am playing with the FluentSecurity library for asp.net mvc. One of the interfaces opened by this library ISecurityContextis as shown below:
public interface ISecurityContext
{
dynamic Data { get; }
bool CurrenUserAuthenticated();
IEnumerable<object> CurrenUserRoles();
}
When I try to access the Data property (as shown below), it is not available. Although two other methods seem to be available.
public class ExperimentalPolicy : ISecurityPolicy
{
public PolicyResult Enforce(ISecurityContext context)
{
dynamic data = context.Data;
}
}
What am I missing? Thank.
source
share