faux

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 6 Imported by: 0

README

FauxProvider

This provider is merely here to help with testing other parts of these packages. I wouldn't recommend using it. :)

Documentation

Overview

Package faux is used exclusively for testing purposes. I would strongly suggest you move along as there's nothing to see here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Provider is used only for testing.

func (*Provider) BeginAuth

func (p *Provider) BeginAuth(state string) (goth.Session, error)

BeginAuth is used only for testing.

func (*Provider) Client

func (p *Provider) Client() *http.Client

func (*Provider) Debug

func (p *Provider) Debug(debug bool)

Debug is used only for testing.

func (*Provider) FetchUser

func (p *Provider) FetchUser(session goth.Session) (goth.User, error)

FetchUser is used only for testing.

func (*Provider) Name

func (p *Provider) Name() string

Name is used only for testing.

func (*Provider) RefreshToken

func (p *Provider) RefreshToken(refreshToken string) (*oauth2.Token, error)

RefreshToken is used only for testing

func (*Provider) RefreshTokenAvailable

func (p *Provider) RefreshTokenAvailable() bool

RefreshTokenAvailable is used only for testing

func (*Provider) SetName

func (p *Provider) SetName(name string)

SetName is to update the name of the provider (needed in case of multiple providers of 1 type)

func (*Provider) UnmarshalSession

func (p *Provider) UnmarshalSession(data string) (goth.Session, error)

UnmarshalSession is used only for testing.

type Session

type Session struct {
	ID          string
	Name        string
	Email       string
	AuthURL     string
	AccessToken string
}

Session is used only for testing.

func (*Session) Authorize

func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string, error)

Authorize is used only for testing.

func (*Session) GetAuthURL

func (s *Session) GetAuthURL() (string, error)

GetAuthURL is used only for testing.

func (*Session) Marshal

func (s *Session) Marshal() string

Marshal is used only for testing.

Jump to

Keyboard shortcuts

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