public function getTemporaryCredentials()
    {
        $uri = $this->urlTemporaryCredentials();

        $client = $this->createHttpClient();

        $header = $this->temporaryCredentialsProtocolHeader($uri);
        $authorizationHeader = array('Authorization' => $header);
        $headers = $this->buildHttpClientHeaders($authorizationHeader);

        try {
            $response = $client->post($uri, [
                'headers' => $headers,
            ]);
        } catch (BadResponseException $e) {
            return $this->handleTemporaryCredentialsBadResponse($e);
        }

        return $this->createTemporaryCredentials((string) $response->getBody());
    }
public function getTemporaryCredentials()
    {
        $uri = $this->urlTemporaryCredentials();

        $client = $this->createHttpClient();

        $header = $this->temporaryCredentialsProtocolHeader($uri);
        $authorizationHeader = array('Authorization' => $header);
        $headers = $this->buildHttpClientHeaders($authorizationHeader);

        try {
            $response = $client->post($uri, [
                'headers' => $headers,
            ]);
        } catch (BadResponseException $e) {
            return $this->handleTemporaryCredentialsBadResponse($e);
        }

        return $this->createTemporaryCredentials((string) $response->getBody());
    }
public function getTemporaryCredentials ( ) { $ uri = $ this -> urlTemporaryCredentials ( ) ; $ client = $ this -> createHttpClient ( ) ; $ header = $ this -> temporaryCredentialsProtocolHeader ( $ uri ) ; $ authorizationHeader = array ( 'Authorization' => $ header ) ; $ headers = $ this -> buildHttpClientHeaders ( $ authorizationHeader ) ; try { $ response = $ client -> post ( $ uri , [ 'headers' => $ headers , ] ) ; } catch ( BadResponseException $ e ) { return $ this -> handleTemporaryCredentialsBadResponse ( $ e ) ; } return $ this -> createTemporaryCredentials ( ( string ) $ response -> getBody ( ) ) ; }
Gets temporary credentials by performing a request to
the server.

@return TemporaryCredentials
Gets temporary credentials by performing a request to the server .