src/Operation/InitiateSso.php
public function get(UserInterface $user, $platform)
    {
        $request = $this->initHttpRequest(
            $this->account->getApiToken(Token::API_SSO),
            $this->account->getName()
        );
        $request->setPath(ApiRequest::PATH_SSO_AUTH);
        $request->setContentType(self::CONTENT_TYPE_APPLICATION_JSON);
        $request->setReplaceParams(array('{platform}' => $platform));
        $response = $request->post($user);
        if ($response->getCode() !== 200) {
            throw ExceptionBuilder::fromHttpRequestAndResponse($request, $response);
        }

        return $response->getJsonResult()->login_url;
    }
public function get(UserInterface $user, $platform)
    {
        $request = $this->initHttpRequest(
            $this->account->getApiToken(Token::API_SSO),
            $this->account->getName()
        );
        $request->setPath(ApiRequest::PATH_SSO_AUTH);
        $request->setContentType(self::CONTENT_TYPE_APPLICATION_JSON);
        $request->setReplaceParams(array('{platform}' => $platform));
        $response = $request->post($user);
        if ($response->getCode() !== 200) {
            throw ExceptionBuilder::fromHttpRequestAndResponse($request, $response);
        }

        return $response->getJsonResult()->login_url;
    }
public function get ( UserInterface $ user , $ platform ) { $ request = $ this -> initHttpRequest ( $ this -> account -> getApiToken ( Token :: API_SSO ) , $ this -> account -> getName ( ) ) ; $ request -> setPath ( ApiRequest :: PATH_SSO_AUTH ) ; $ request -> setContentType ( self :: CONTENT_TYPE_APPLICATION_JSON ) ; $ request -> setReplaceParams ( array ( '{platform}' => $ platform ) ) ; $ response = $ request -> post ( $ user ) ; if ( $ response -> getCode ( ) !== 200 ) { throw ExceptionBuilder :: fromHttpRequestAndResponse ( $ request , $ response ) ; } return $ response -> getJsonResult ( ) -> login_url ; }
Sends a POST request to get a single sign-on URL for a store

@param UserInterface $user
@param $platform
@return string the sso URL if the request was successful.
@throws NostoException
@throws AbstractHttpException
Sends a POST request to get a single sign - on URL for a store