0

I am using this code to authenticate user on magento is

$redirecturi = 'http://localhost/magento';
$temporaryCredentialsRequestUrl = "http://localhost/magento/oauth/initiate?oauth_callback=".$redirecturi;
$customerAuthorizationUrl = 'http://localhost/magento/oauth/authorize';
$accessTokenRequestUrl = 'http://localhost/magento/oauth/token';

$oauthClient = new OAuth($consumerkey, $consumersecret, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI);
$oauthClient->enableDebug();

$requestToken = $oauthClient->getRequestToken($temporaryCredentialsRequestUrl);
header('Location: '.$customerAuthorizationUrl.'?oauth_token='.$requestToken['oauth_token']);
exit(0);

but it display fatal error like this 'Class 'OAuth' not found'. I use this link for authentication magento authentication. Please review this and reply answer.

Thanks..

1 Answer 1

1

Please check if you have OAUth Extension for PHP installed. See http://www.php.net/manual/en/oauth.installation.php

Sign up to request clarification or add additional context in comments.

2 Comments

please help me to install oauth extension and give me library file to add.
The library file you need depends on your PHP Version and Server OS. All you need is described on the link I've posted above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.