Exemplo n.º 1
0
 protected void createAndSendLoginRequest(DossiaOpenID dossiaOpenID, OpenIdClient openIdClient)
 {
     dossiaOpenID.InitializeForSending(openIdClient);
     AttributeExchange attributeExchange = new AttributeExchange(openIdClient);
     // see http://docs.dossia.org/index.php/Dossia_OpenID_Consumer_Developer_Guide#Attributes_Available_via_OpenID
     // for list of available attributes
     attributeExchange.AddFetchItem("http://openid.dossia.org/participant/firstName", "firstName", 1, true);
     attributeExchange.AddFetchItem("http://openid.dossia.org/participant/lastName", "lastName", 1, true);
     
     openIdClient.CreateRequest(false, true);
 }
Exemplo n.º 2
0
        protected void createAndSendLoginRequest(DossiaOpenID dossiaOpenID, 
            OpenIdClient openIdClient, 
            Boolean reqAttributes,
            Boolean reqOauthToken)
        {
            dossiaOpenID.InitializeForSending(openIdClient);
            
            // see http://docs.dossia.org/index.php/Dossia_OpenID_Consumer_Developer_Guide#Attributes_Available_via_OpenID
            // for list of available attributes
            if (reqAttributes)
            {
                AttributeExchange attributeExchange = new AttributeExchange(openIdClient);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/address1", "address1", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/address2", "address2", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/city", "city", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/dateOfBirth", "dateOfBirth", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/email", "email", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/employeeId", "employeeId", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/employer", "employer", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/firstName", "firstName", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/gender", "gender", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/lastName", "lastName", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/middleName", "middleName", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/postalCode", "postalCode", 1, true);
                attributeExchange.AddFetchItem("http://openid.dossia.org/participant/state", "state", 1, true);
            }

            if (reqOauthToken)
            {
                OAuthClient oauthClient = DossiaOauth.createDossiaOAuthClient();
                OAuthExtension oauthext = new OAuthExtension(openIdClient, oauthClient);
            }

            openIdClient.CreateRequest(false, true);
        }