예제 #1
0
파일: Saml.cs 프로젝트: pdo9141/SamlTester
        public Response(byte[] certificate)
        {
            RSAPKCS1SHA256SignatureDescription.Init();     //init the SHA256 crypto provider (for needed for .NET 4.0 and lower)

            _certificate = new Certificate();
            _certificate.LoadCertificate(certificate);
        }
예제 #2
0
파일: Saml.cs 프로젝트: pdo9141/SamlTester
        public AuthRequest(string issuer, string assertionConsumerServiceUrl)
        {
            RSAPKCS1SHA256SignatureDescription.Init();             //init the SHA256 crypto provider (for needed for .NET 4.0 and lower)

            _id            = "_" + System.Guid.NewGuid().ToString();
            _issue_instant = DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ");

            _issuer = issuer;
            _assertionConsumerServiceUrl = assertionConsumerServiceUrl;
        }
예제 #3
0
        public SignoutRequest(string issuer, string nameId, string logoutCallbackUrl)
        {
            RSAPKCS1SHA256SignatureDescription.Init();             //init the SHA256 crypto provider (for needed for .NET 4.0 and lower)

            _id            = "_" + Guid.NewGuid().ToString();
            _issue_instant = DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ", System.Globalization.CultureInfo.InvariantCulture);

            _issuer            = issuer;
            _nameId            = nameId;
            _logoutCallbackUrl = logoutCallbackUrl;
        }
예제 #4
0
        public Response(byte[] certificateBytes)
        {
            RSAPKCS1SHA256SignatureDescription.Init();             //init the SHA256 crypto provider (for needed for .NET 4.0 and lower)

            try
            {
                _certificate = new X509Certificate2(certificateBytes);
            } catch (Exception ex)
            {
                throw new LoadCertificateException("Failed to load certificate", ex);
            }
        }
예제 #5
0
        public AuthRequest(string issuer, string assertionConsumerServiceUrl)
        {
            RSAPKCS1SHA256SignatureDescription.Init();             //init the SHA256 crypto provider (for needed for .NET 4.0 and lower)

            if (issuer == null || assertionConsumerServiceUrl == null)
            {
                throw new NullReferenceException();
            }

            _id            = "_" + Guid.NewGuid().ToString();
            _issue_instant = DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ", System.Globalization.CultureInfo.InvariantCulture);

            _issuer = issuer;
            _assertionConsumerServiceUrl = assertionConsumerServiceUrl;
        }
예제 #6
0
 public BaseResponse(byte[] certificateBytes)
 {
     RSAPKCS1SHA256SignatureDescription.Init();             //init the SHA256 crypto provider (for needed for .NET 4.0 and lower)
     _certificate = new X509Certificate2(certificateBytes);
 }