func ParseRequestToken(reader io.ReadCloser) (*RequestToken, error) {
	body, err := ioutil.ReadAll(reader)
	reader.Close()
	if err != nil {
		return nil, err
	}
	return ParseRequestTokenStr(string(body))
}
ParseRequestToken parses the URL-encoded query string from the Reader
and returns a RequestToken.
package oauth1
import (
	"errors"
	"io"
	"io/ioutil"
	"net/url"
	"strconv"
)
type Token interface {
	Token()  string  
	Secret() string  
	Encode() string  
}
type AccessToken struct {
	token  string             
	secret string             
	params map[string]string  
}
func NewAccessToken(token, secret string, params map[string]string) *AccessToken {
	return &AccessToken {
		token  : token,
		secret : secret,
		params : params,
	}
}
func ParseAccessToken(reader io.ReadCloser) (*AccessToken, error) {
	body, err := ioutil.ReadAll(reader)
	reader.Close()
	if err != nil {
		return nil, err
	}
	return ParseAccessTokenStr(string(body))
}
func ParseAccessTokenStr(str string) (*AccessToken, error) {
	token := AccessToken{}
	token.params = map[string]string{}
	parts, err := url.ParseQuery(str)
	if err != nil {
		return nil, err
	}
	for key, val := range parts {
		switch key {
		case "oauth_token"        : token.token = val[0]
		case "oauth_token_secret" : token.secret = val[0]
		default                   : token.params[key] = val[0]
		}
	}
	switch {
	case len(token.token) == 0  : return nil, errors.New(str)
	case len(token.secret) == 0 : return nil, errors.New(str)
	}
	return &token, nil
}
func (a *AccessToken) Encode() string {
	values := url.Values{}
	values.Set("oauth_token", a.token)
	values.Set("oauth_token_secret", a.secret)
	if a.params != nil {
		for key, val := range a.params {
			values.Set(key, val)
		}
	}
	return values.Encode()
}
func (a *AccessToken) Token()  string { return a.token }
func (a *AccessToken) Secret() string { return a.secret }
func (a *AccessToken) Params() map[string]string { return a.params }
type RequestToken struct {
	token  string  
	secret string  
	callbackConfirmed bool
}