protected void Page_Load(object sender, EventArgs e)
        {
            var signer = new Signer(ConfigurationManager.AppSettings["pfxFile"], ConfigurationManager.AppSettings["pfxPassword"]);
            var generator = new OcesAppletElementGenerator(signer);
            generator.AddServerUrlPrefix(ConfigurationManager.AppSettings["nemIDAppletPrefix"]);
            generator.AddReturnUrl(Request["ReturnUrl"]);
            var challenge = ChallengeGenerator.GenerateChallenge(Session);
            generator.SetChallenge(challenge);
            generator.SetLogLevel("debug"); // INFO/DEBUG/ERROR
            generatorSpan.InnerHtml = generator.GenerateLogonAppletElement("logon.aspx");

            loginOtpLink.PostBackUrl = "log-ind-med-engangsnoegle.aspx?ReturnUrl=" + RequestValidator.getValidatedEncodedParam(Request["returnUrl"]);
            loginDigSignaturLink.PostBackUrl = "log-ind-med-digital-signatur.aspx?ReturnUrl=" + RequestValidator.getValidatedEncodedParam(Request["returnUrl"]);
        }
예제 #2
0
 public OcesAppletElementGenerator(Signer signer)
 {
     _signer = signer;
 }
 public OcesAppletElementGenerator(Signer signer)
 {
     _signer = signer;
 }