Esempio n. 1
0
 public AuthenticationConclusion SignInRP(SignInRPReq req)
 {
     return(new AuthenticationConclusion {
         authenticatedClient = req.SVX_sender,
         idpUsername = req.username
     });
 }
Esempio n. 2
0
            public SignInRPReq SignInIdP(SignInIdPReq req)
            {
                if (req.password != "password:" + req.username)
                {
                    throw new ArgumentException();
                }
                var userPrincipal = IdPUserPrincipal(req.username);

                // If this line is commented out, the check for whether it's OK
                // to send the secret to the client would fail, but this example
                // doesn't use export/import.
                VProgram_API.AssumeActsFor(req.SVX_sender, userPrincipal);
                var ssoSecretParams = new SSOSecretParams {
                    username = req.username
                };
                var resp = new SignInRPReq {
                    username  = req.username,
                    ssoSecret = ssoSecretGenerator.Generate(ssoSecretParams, SVX_Principal)
                };

                ssoSecretGenerator.Verify(ssoSecretParams, resp.ssoSecret);
                return(resp);
            }