Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

[SDK] Rabbit -- unify multiple forms of PlayerIO authentication

If you are using EE-Rabbit (on NuGet) please update to RabbitIO available at https://www.nuget.org/packages/RabbitIO/ as EE-Rabbit will not receive any updates. The API contains breaking changes, read more about them at https://github.com/Decagon/Rabbit/blob/master/README.md

Survey: http://goo.gl/forms/b6OTQxj5LQ

---
Hello,

Recently I just created Rabbit (along with a lot of help from the contributors!) which helps with simplifying EE authentication. This means that you can display one login and password window, and Rabbit will automatically detect the type of authentication and give back a valid Connection handler. No more tabs, windows, or options. It just works.

Comments, criticism and anything else is welcome. Feel free to fork at https://github.com/Decagon/Rabbit

Last edited by Hexagon (Jan 4 2015 7:19:09 pm)

Offline

#2 Before February 2015

lrussell
Member
From: Saturn's Titan
Joined: 2015-02-15
Posts: 843
Website

Re: [SDK] Rabbit -- unify multiple forms of PlayerIO authentication

An option to use your username to login instead would be nice. You can simply convert the username to its ID, then it'll have a prefix of "simple", "kong", "fb", or "armor". Whatever you have after that is what you put in the place of the email. I've been using that setup for a while now.

Offline

#3 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Re: [SDK] Rabbit -- unify multiple forms of PlayerIO authentication

That'd be great; I'll definitely add that feature!

Offline

#4 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Re: [SDK] Rabbit -- unify multiple forms of PlayerIO authentication

lrussell wrote:

You can simply convert the username to its ID

I was able to do this (using Atilla's gDat) however when I supplied the userid (in place of the email address) the authentication failed. How do you do this?

Offline

#5 Before February 2015

abrar11
Member
Joined: 2015-03-13
Posts: 359

Re: [SDK] Rabbit -- unify multiple forms of PlayerIO authentication

I KNOW THIS CODE IS REALLY SLOPPY AND THERE ARE WAYS TO DO IT WITHIN 2 LINES BUT WHATEVER I USE THIS WAY AS IT WORKS SO IT DOESN'T REALLY MATTER UNLESS YOUR GOING FOR SHORT CODE BUT YEAH ITS REALLY SLOPPY =P YOU CAN FIX IT IF YOU WANT


string getUserID(string id, string name)
           {
                 PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "guest", "guest",
                delegate(Client c)
                {
                      c.BigDB.Load("Usernames", name.ToLower(),
                      delegate(DatabaseObject dbo)
                      {
                            foreach (KeyValuePair<string, object> d in dbo)
                            {
                                  id = d.Value.ToString();
                            }
                      });

                });
                 return id;
                
           }

USAGE: getUserID(null,"player");

Offline

#6 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Re: [SDK] Rabbit -- unify multiple forms of PlayerIO authentication

Thank you Abrar for the code (as it eliminates my need on gDat). To rephrase my question, I am able to get the user id however I do not know how to authenticate the user on that user id. When I execute the login function (from PlayerIO) I put the user id in the place where the email would go and use the valid password for that account. However it says that the authentication failed which means that there is probably a different method I should be using.

Offline

#7 Before February 2015

ewoke
Member
Joined: 2015-02-20
Posts: 412

Re: [SDK] Rabbit -- unify multiple forms of PlayerIO authentication

Client c = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "<a class="__cf_email__" href="/cdn-cgi/l/email-protection" data-cfemail="aeddc1c3cbdac6c7c0c9eeddc1c3cbdac6c7c0c980ddc1c3cbdac6c7c0c9">[email  protected]</a><script cf-hash='f9e31' type="text/javascript"> /* <![CDATA[ */!function(){try{var t="currentScript"in document?document.currentScript:function(){for(var t=document.getElementsByTagName("script"),e=t.length;e--;)if(t[e].getAttribute("cf-hash"))return t[e]}();if(t&&t.previousSibling){var e,r,n,i,c=t.previousSibling,a=c.getAttribute("data-cfemail");if(a){for(e="",r=parseInt(a.substr(0,2),16),n=2;a.length-n;n+=2)i=parseInt(a.substr(n,2),16)^r,e+=String.fromCharCode(i);e=document.createTextNode(e),c.parentNode.replaceChild(e,c)}}}catch(u){}}();/* ]]> */</script>", "password");

void getuserid(string name)
{
     return c.BigDB.Load("usernames", name)["owner"].ToString();
}

i have no idea about the auth but will check source if i can find something

Last edited by ewoke (Jul 28 2014 2:26:25 pm)


if you can read this....good for you

Offline

#8 Before February 2015

abrar11
Member
Joined: 2015-03-13
Posts: 359

Re: [SDK] Rabbit -- unify multiple forms of PlayerIO authentication

Well this is edited from ewokes thing

Client c = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "guest", "guest");
void getAuth(string name)
{
string id = c.BigDB.Load("usernames", name)["owner"].ToString();
if(name.StartsWith("kong")
{
return authtype.kong;
}
if(name.StartsWith("facebook")
{
return authtype.facebook;
}
else
{
return authtype.everybodyedits?
}?

something like that?

Offline

#9 Before February 2015

lrussell
Member
From: Saturn's Titan
Joined: 2015-02-15
Posts: 843
Website

Re: [SDK] Rabbit -- unify multiple forms of PlayerIO authentication

Hexagon wrote:

Thank you Abrar for the code (as it eliminates my need on gDat). To rephrase my question, I am able to get the user id however I do not know how to authenticate the user on that user id. When I execute the login function (from PlayerIO) I put the user id in the place where the email would go and use the valid password for that account. However it says that the authentication failed which means that there is probably a different method I should be using.

Once you've determined the auth type, simply cut off the prefix. It goes in the same place where email's should.
simple1403642481652x19 = 1403642481652x19

Also, if you want, you can make a simple request to my tool:
http://titanshell.com/~lrussell/ee_tools/userlookup.php

It's like gDat, but always does a direct lookup to EE. It's about 300ms slower than atilla's.

Offline

#10 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Re: [SDK] Rabbit -- unify multiple forms of PlayerIO authentication

Thank you lrussell, I'll try that and see how it goes.

Offline

#11 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Re: [SDK] Rabbit -- unify multiple forms of PlayerIO authentication

Hello everyone,

RabbitIO (formerly EE-Rabbit) version 0.9 has been released on NuGet and GitHub. Please download RabbitIO on NuGet and remove EE-Rabbit, as EE-Rabbit will not continue to receive updates.

Since Rabbit is now a multipurpose PlayerIO library, please read the README.md file on the Github https://github.com/Decagon/Rabbit/blob/master/README.md if you are upgrading from v0.7.4 (as there are some breaking API changes).

Offline

Hexagon1423758935202497

Board footer

Powered by FluxBB

[ Started around 1713436549.6708 - Generated in 0.075 seconds, 10 queries executed - Memory usage: 1.52 MiB (Peak: 1.68 MiB) ]