none
how to access Saml2Constants.ConfirmationMethods.Bearer property using System.IdentityModel RRS feed

  • Question

  • I am in process of upgrading my existing Microsoft.IdentityModel(WIF3.5)  based SSO block to System.IdentityModel (.Net 4.5).

    Does any one know how to access Saml2Constants.ConfirmationMethods.Bearer property using System.IdentityModel.Token ? In older implementation( Microsoft.IdentityModel) implementation the access modifier of Saml2Constants was public static where as in newer System.IdentityModel way Microsoft made Saml2Constants  class as internal static.

    Here is a small code snippet I was trying to upgrade where in the  last line I am getting a compile tme error for Saml2Constants.ConfirmationMethods.Bearer due to it’s internal access modifier.

      private Saml2Subject CreateSubject(string recipient, DateTime expirationTime, string nameId = "", string nameValue ="") 
            { 
                var subject = new Saml2Subject(); 
                var subjectConfData = new Saml2SubjectConfirmationData(); 
                subjectConfData.Recipient = new Uri(recipient); 
                subjectConfData.NotOnOrAfter = expirationTime; 
                subject.SubjectConfirmations.Add(new Saml2SubjectConfirmation(Saml2Constants.ConfirmationMethods.Bearer, subjectConfData));
    

    Is there any alternative to it ?


    Lingaraj Mishra

    Wednesday, October 25, 2017 9:13 AM

All replies