0

i want to implement rhino security on my application. i have user entity class whose Id field is GUID.

according to Rhino security instructions i have to implement IUser interface which contains an id field which is long. now how can i implement IUSer interface without changing datatype of my user entity class

yrahman
  • 960
  • 5
  • 15
  • 33

1 Answers1

1

Where'd you see that? The IUser interface only requires implementors to expose a SecurityInfo property.

IUser source

I use Guids for my Ids and create a SecurityInfo object based on it

    public virtual SecurityInfo SecurityInfo
    {
        get
        {
            return new SecurityInfo(this.Username,this.Id);
        }
    }

The first argument is the name of the user (it can be any string property) the second is your id which can be any object, including Guids.

Jason Freitas
  • 1,587
  • 10
  • 18