Extending Windows Identity

Discussion in 'ASP .Net Security' started by Stokesy, Jul 15, 2005.

  1. Stokesy

    Stokesy Guest


    I wan't to implement an reusable login framework which extends on
    WindowsIdentity to provide additional attributes which can be filled from the
    AD or a Database.

    Is the best method to implement IIDentity or to inherit from
    WindowsIdentity. If the latter, can someone post a sample on the best way to
    do this.

    Many Thanks
    Stokesy, Jul 15, 2005
    1. Advertisements

  2. Probably the best bet is to implement a custom IPrincipal object with your
    special properties on it. You could provide implementation that inherit
    from WindowsPrincipal and implement your special interface and also provide
    other implementations that implement IPrincipal and your custom interface
    such as extending GenericPrincipal. This gives you maximum flexibility
    which is nice in a reusable framework.

    Joe K.
    Joe Kaplan \(MVP - ADSI\), Jul 15, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.