1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Xbox Live Authentication

Discussion in 'General discussion' started by NFGamerMC, Sep 7, 2017.

  1. NFGamerMC

    NFGamerMC Spider Jockey

    Messages:
    30
    Hi there,
    How can I check if a player is authenticated using Xbox Live and their XUID?
     
  2. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    at the moment it's not implemented into pm itself but it's due to be implemented very soon. Either wait for pmmp to implement or look at how the old genisys did it for example
    (You'll need OpenSSLm, but all new php bins built with php-build-scripts should contain it.
     
  3. r7vmc

    r7vmc Baby Zombie

    Messages:
    112
    GitHub:
    r7vmc
    PHP:
    public function onPacketReceived(DataPacketReceiveEvent $event){
        
    $packet $event->getPacket();
        if(
    $packet instanceof LoginPacket){
            if(!isset(
    $packet->chainData["chain"][2])){
            
    //do stuff
                
    }
           }
    }
    thanks @Muqsit for that code
     
  4. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    well, that is not infallable. Users with mods might still pretend that they are logged in.
     
  5. r7vmc

    r7vmc Baby Zombie

    Messages:
    112
    GitHub:
    r7vmc
    But it's the currently working way
     
  6. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    it's not even "working"
     
  7. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    not infallible? it's worse than useless if you ask me... what happens if an MCPE update adds extra links to the chain?

    The correct way to do this is verify the signature of the JWTs. The following things should be checked:
    a) the first link is self-signed
    b) the second link is signed with the Mojang root public key
    c) every link after that is signed with the identityPublicKey of the previous link.

    I was intending to implement this today, but the crypto library I want to use is currently not compatible with PHP 7.2.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.