ADFS Identity Single Sign On Identity

Discussion in 'Active Directory' started by XSler, May 14, 2008.

  1. XSler

    XSler Guest

    I apologize if this is in the wrong newsgroup, I couldn't find an ADFS one on
    the public index.

    I am currently trying to build an ADFS claims aware application, which is
    going ok. The problem is the creation of a SingleSignOnIdentity object,
    because every code example I am seeing is as such:

    SingleSignOnIdentity id = (SingleSignOnIdentity)User.Identity;

    But what is User?

    I can get it to work with the thread:

    public static SingleSignOnIdentity SSOID
    get { return (SingleSignOnIdentity)
    Thread.CurrentPrincipal.Identity }

    But that doesn't fly because it will return the appplication pool account.
    So I try this:

    public static SingleSignOnIdentity SSOID
    get { return (SingleSignOnIdentity)
    HttpContext.Current.User.Identity; }
    and it returns a casting error.

    Any Thoughts?
    XSler, May 14, 2008
    1. Advertisements

  2. XSler

    Joe Kaplan Guest

    If HttpContext.Current.User.Identity is not of type SingleSignOnIdentity,
    the ADFS claims aware agent is not working. One of its primary
    responsibilities is to set Context.User to an IPrincipal object that
    contains a SingleSignOnIdentity as the IIdentity in the Identity property.
    Setting Context.User should also result in Thread.CurrentPrincipal being the
    same object as Context.User, so you should be able to use those

    Joe K.
    Joe Kaplan, May 14, 2008
    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.