oauth2

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdalHandler

type AdalHandler struct {
	// contains filtered or unexported fields
}

func NewAdal added in v1.1.0

func NewAdal(opts ...Option) (*AdalHandler, error)

func (*AdalHandler) GetAccessToken

func (h *AdalHandler) GetAccessToken() (string, error)

func (*AdalHandler) LoginProviderURL added in v1.1.0

func (h *AdalHandler) LoginProviderURL() (string, error)

func (*AdalHandler) UpdateFromCode

func (h *AdalHandler) UpdateFromCode(code string) error

func (*AdalHandler) UpdateFromRedirect

func (h *AdalHandler) UpdateFromRedirect(redirect *url.URL) error

type EmptyOption added in v1.1.0

type EmptyOption struct{}

type Handler

type Handler interface {
	GetAccessToken() (string, error)
	UpdateFromRedirect(*url.URL) error
	UpdateFromCode(string) error
}

type Oauth2Settings added in v1.1.0

type Oauth2Settings struct {
	TenantID     string
	AuthServer   string
	ClientID     string
	ClientSecret string
	ResourceID   string
}

func (Oauth2Settings) Valid added in v1.1.0

func (o2o Oauth2Settings) Valid() bool

type Option added in v1.1.0

type Option interface {
	// contains filtered or unexported methods
}

func WithClient added in v1.1.0

func WithClient(client *http.Client) Option

func WithOauth2Settings added in v1.1.0

func WithOauth2Settings(o2o Oauth2Settings) Option

func WithRenewer added in v1.1.0

func WithRenewer(renewer func()) Option

func WithState added in v1.1.0

func WithState(state string) Option

func WithStore added in v1.1.0

func WithStore(store storage.Storage) Option

type RedirectParams added in v1.1.0

type RedirectParams struct {
	// contains filtered or unexported fields
}

func DecodeRedirect added in v1.1.0

func DecodeRedirect(u *url.URL) *RedirectParams

type Tokens

type Tokens struct {
	AccessToken  string
	IDToken      string
	RefreshToken string
}

Jump to

Keyboard shortcuts

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