oauthplain

package module
v0.0.0-...-bbbd263 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2014 License: MIT Imports: 9 Imported by: 5

README

oauthplain

OAuth 1.0 in "PLAINTEXT" mode for Go clients

Installation

Install oauthplain using the "go get" command:

go get github.com/tambet/oauthplain

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ConsumerKey       string
	ConsumerSecret    string
	RequestTokenUrl   string
	AuthorizeTokenUrl string
	AccessTokenUrl    string
}

func (*Config) UpdateURLs

func (c *Config) UpdateURLs(s ...interface{}) *Config

type Token

type Token struct {
	ConsumerKey      string
	ConsumerSecret   string
	OAuthToken       string
	OAuthTokenSecret string
	OAuthVerifier    string
	AuthorizeUrl     string
	Extra            map[string]string
}

func (*Token) AuthHeader

func (t *Token) AuthHeader() string

type Transport

type Transport struct {
	*Config
}

func (*Transport) AuthCodeURL

func (t *Transport) AuthCodeURL(callbackURL string) (*Token, error)

func (*Transport) Client

func (t *Transport) Client() *http.Client

func (*Transport) Exchange

func (t *Transport) Exchange(token *Token) error

func (*Transport) NewToken

func (t *Transport) NewToken(extra map[string]string) *Token

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL