twoleg

package
v0.0.0-...-e9ebf91 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2018 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package twoleg provides functions for working with the two-legged OAuth flow described at https://developer.lyft.com/v1/docs/authentication#section-client-credentials-2-legged-flow-for-public-endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	AccessToken string
	TokenType   string
	Expires     time.Duration
	Scopes      []string
}

Token is returned by GenerateToken.

func GenerateToken

func GenerateToken(c *http.Client, baseURL, clientID, clientSecret string) (Token, http.Header, error)

GenerateToken creates a new access token. The access token returned can be used in lyft.Client. baseURL is typically lyft.BaseURL.

Jump to

Keyboard shortcuts

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