oauth1

package module
v0.0.0-...-4ecf7ba Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: MIT Imports: 11 Imported by: 0

README

oauth1

For generating and verifying signatures of oauth1 requests.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(s string) string

Encode percent-encodes a string as defined in RFC 3986.

func GenerateNonce

func GenerateNonce() string

func GenerateSignature

func GenerateSignature(r *http.Request, secret string) (result string, err error)

func GenerateTimestamp

func GenerateTimestamp() string

Types

type Pair

type Pair struct {
	Key   string
	Value string
}

type Params

type Params []*Pair

func GetParams

func GetParams(r *http.Request) (result Params)

func (*Params) Add

func (p *Params) Add(pair *Pair)

func (Params) Len

func (p Params) Len() int

func (Params) Less

func (p Params) Less(i, j int) bool

func (Params) Swap

func (p Params) Swap(i, j int)

Jump to

Keyboard shortcuts

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