Giter Site home page Giter Site logo

Comments (3)

yodyyyy avatar yodyyyy commented on July 23, 2024 2

i think the most problem with getallheaders(), as example running with PHP-FPM. So maybe you must put this code on your script

public function getallheaders() {
    $headers = [];
    foreach ($_SERVER as $name => $value) {
        if (substr($name, 0, 5) == 'HTTP_') {
            $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
        }
    }
    return $headers;
    }

thank you, sorry for bad english

from sso.

awnali avatar awnali commented on July 23, 2024 2

I got the same error while integrating it with Laravel 5.4. This is how i solved it:
Go to Login method of Jasny\SSO\Server class, core library (must be in vendor folder). change last line to, return $this->userInfo();
Then go to userInfo method and change the last line to: return $user;

Now return from your controller with json header, for example in case of laravel i did:
return response()->json([ 'user' => $user ]);

from sso.

jasny avatar jasny commented on July 23, 2024

The error is pretty explicit. The Broker didn't receive JSON from the server. Maybe the URL is misconfigured or there is somekind of server error. I can't tell. You need to debug to see what the server has send.

from sso.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.