Ejemplo n.º 1
0
 public Concat3Response AssumeProducerActsForAlice(Concat3Response x)
 {
     // For testing.  Wanted: a cleaner way to get this into the SymT!
     VProgram_API.AssumeActsFor(x.SVX_producer, Entity.Of("Carol"));
     VProgram_API.AssumeActsFor(Entity.Of("Carol"), Entity.Of("Alice"));
     return(x);
 }
            public IdPAuthenticationEntry SVX_ConcludeClientAuthentication(IdPAuthenticationEntry entry)
            {
                var d = new SignedInDeclarer {
                    outer = this, entry = entry
                };

                SVX_Ops.Ghost(d.Declare);
                VProgram_API.AssumeActsFor(entry.authenticatedClient, GoogleUserPrincipal(entry.googleUsername));
                // Reuse the message... Should be able to get away with it.
                return(entry);
            }
Ejemplo n.º 3
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);
            }