Exemplo n.º 1
0
    private IDCardType GetIDCard(bool sts)
    {
        IDCardType       card = new IDCardType();
        AuthenticityType auth = new AuthenticityType();
        IDCardDataType   data = new IDCardDataType();

        card.Authenticity = auth;
        card.IDCardData   = data;

        data.IDCardType    = "IdCardSignature";
        data.IDCardVersion = "1.1";

        // Issuer
        card.Issuer = "SEI Client";

        // Subject
//		auth.NameID = "1111111118";
        auth.NameID = "2207712801";
        //			card.NameIDFormat            = FormatIds.cprnumber;
        auth.MakeCertificate = new CertificateMaker(GetCertificate);

        // Conditions
        //			card.CardLifeTime            = CardLifeTimeType.Hours8;

        // Authentication (STS)
        if (sts)
        {
            card.STS = new STSType();
            card.STS.IssuerAddress      = "SOSI-STS";
            card.STS.Endpoint           = "http://pan.certifikat.dk/sts/services/SecurityTokenService";
            card.STS.CertificatePointer = "?";
        }

        // Attributes
        data.IDCardType          = "user";
        data.AuthenticationLevel = 3;
//		data.UserCivilRegistrationNumber = "1111111118";
        data.UserCivilRegistrationNumber = "2207712801";
        data.UserGivenName    = "Bent";
        data.UserSurName      = "Hansen";
        data.UserEmailAddress = "*****@*****.**";
        data.UserRole         = "SEI User";
        data.UserOccupation   = "?";

        // System log
        data.ITSystemName         = "SEI Client";
        data.CareProviderID       = "12070918";
        data.CareProviderIDFormat = "medcom:cvrnumber";
        data.CareProviderName     = "SST";

        return(card);
    }
Exemplo n.º 2
0
        private IDCardType GetIDCard()
        {
            IDCardType       card = new IDCardType();
            AuthenticityType auth = new AuthenticityType();
            IDCardDataType   data = new IDCardDataType();

            card.Authenticity = auth;
            card.IDCardData   = data;

            data.IDCardType    = "IdCardSignature";
            data.IDCardVersion = "1.1";

            // Issuer
            card.Issuer = "SEI Client";

            // Subject
            auth.NameID = "1111111118";
//			card.NameIDFormat            = FormatIds.cprnumber;
            auth.MakeCertificate = new CertificateMaker(GetCertificate);

            // Conditions
//			card.CardLifeTime            = CardLifeTimeType.Hours8;

            // Authentication (STS)

            // Attributes
            data.IDCardType                  = "user";
            data.AuthenticationLevel         = 3;
            data.UserCivilRegistrationNumber = "1111111118";
            data.UserGivenName               = "Bent";
            data.UserSurName                 = "Hansen";
            data.UserEmailAddress            = "*****@*****.**";
            data.UserRole       = "SEI User";
            data.UserOccupation = "?";

            // System log
            data.ITSystemName         = "SEI Client";
            data.CareProviderID       = "12070918";
            data.CareProviderIDFormat = "medcom:cvrnumber";
            data.CareProviderName     = "SST";

            return(card);
        }