1<?php
2
3namespace OAuth\OAuth1\Service;
4
5use OAuth\Common\Consumer\CredentialsInterface;
6use OAuth\Common\Storage\TokenStorageInterface;
7use OAuth\Common\Token\TokenInterface;
8use OAuth\Common\Http\Client\ClientInterface;
9use OAuth\Common\Http\Uri\UriInterface;
10use OAuth\Common\Http\Exception\TokenResponseException;
11use OAuth\Common\Service\ServiceInterface as BaseServiceInterface;
12use OAuth\OAuth1\Signature\SignatureInterface;
13
14/**
15 * Defines the common methods across OAuth 1 services.
16 */
17interface ServiceInterface extends BaseServiceInterface
18{
19    /**
20     * Retrieves and stores/returns the OAuth1 request token obtained from the service.
21     *
22     * @return TokenInterface $token
23     *
24     * @throws TokenResponseException
25     */
26    public function requestRequestToken();
27
28    /**
29     * Retrieves and stores/returns the OAuth1 access token after a successful authorization.
30     *
31     * @param string $token       The request token from the callback.
32     * @param string $verifier
33     * @param string $tokenSecret
34     *
35     * @return TokenInterface $token
36     *
37     * @throws TokenResponseException
38     */
39    public function requestAccessToken($token, $verifier, $tokenSecret);
40
41    /**
42     * @return UriInterface
43     */
44    public function getRequestTokenEndpoint();
45}
46