msfix

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package msfix - Content managed by Project Forge, see [projectforge.md] for details.

Package msfix - Content managed by Project Forge, see [projectforge.md] for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	ClientKey   string
	Secret      string
	CallbackURL string
	Tenant      string
	HTTPClient  *http.Client
	// contains filtered or unexported fields
}

func New

func New(clientKey, secret, callbackURL string, tenant string, scopes ...string) *Provider

Note that this is a copy of the `microsoftonline` provider, but accepts a tenant.

func (*Provider) BeginAuth

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

func (*Provider) Client

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

func (*Provider) Debug

func (p *Provider) Debug(_ bool)

func (*Provider) FetchUser

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

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) RefreshToken

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

func (*Provider) RefreshTokenAvailable

func (p *Provider) RefreshTokenAvailable() bool

func (*Provider) SetName

func (p *Provider) SetName(name string)

func (*Provider) UnmarshalSession

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

type Session

type Session struct {
	AuthURL     string
	AccessToken string
	ExpiresAt   time.Time
}

func (*Session) Authorize

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

func (Session) GetAuthURL

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

func (Session) Marshal

func (s Session) Marshal() string

func (Session) String

func (s Session) String() string

Jump to

Keyboard shortcuts

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